Loading...

Difference Between Http Post & Get Methods with HTML

View: 486    Dowload: 0   Comment: 0   Post by: hanhga   Category: HTML-CSS template   Fields: Other

Http Post and Get methods are a part of the HTML language. Both methods are used in HTML form to transmit user’s data to server side programming languages such as Php, Asp.net, Jsp etc. The following difference can be found between these two methods:

Http Post Method Http Get Method
Large data can be send to server (unlimited characters). Minimal data can be send to server (only 2048 characters are allowed).
Information can not be bookmarked in a browser. Information can be bookmarked in a browser.
Information is not visible in browser’s URL. Information is visible in browser’s URL.
Personal and secure information can be sent. Don’t send Personal and secure information.
Any secure information can not be hacked. Any secure information can be hacked easily.
Mostly is used with HTML forms (recommended). Mostly is used with HTML hyperlinks to pass data between difference pages (recommended).
Information can not be cached. Information can be cached.

 

Example: PHP Http Post Method.

<!Doctypes html>
 <html>
 <head>
 <title>PHP Http Post Method</title>
 </head>
  
 <body>
 <?php 
 if(isset($_POST['btn_submit'])) {
 $user_name = $_POST['user_name'];
 $contact = $_POST['contact'];
  
 echo "Name is: " . $user_name . "<br>";
 echo "Contact: " . $contact;
 }
 ?>
 <form method="post" action="">
 <input type="text" name="user_name" placeholder = "Enter Name"> <br><br>
 <input type="text" name="contact" placeholder = "Enter Contact"> <br>
  
 <button type="submit" name="btn_submit"> Submit </button>
 </form>
 </body>
 </html>

Example: PHP Http Get Method.

<!Doctypes html>
 <html>
 <head>
 <title>PHP Http Get Method</title>
 </head>
  
 <body>
 <?php 
 if(isset($_GET['btn_submit'])) {
 $user_name = $_GET['user_name'];
 $contact = $_GET['contact'];
  
 echo "Name is: " . $user_name . "<br>";
 echo "Contact: " . $contact;
 }
 ?>
 <form method="get" action="">
 <input type="text" name="user_name" placeholder = "Enter Name"> <br><br>
 <input type="text" name="contact" placeholder = "Enter Contact"> <br>
  
 <button type="submit" name="btn_submit"> Submit </button>
 </form>
 </body>
 </html>

Difference Between Http Post & Get Methods with HTML

Http Post and Get methods are a part of the HTML language. Both methods are used in HTML form to transmit user’s data to server side programming languages such as Php, Asp.net, Jsp etc. The following difference can be found between these two methods.

Posted on 24-08-2016 

Comment:

To comment you must be logged in members.

Files with category

  • Business/Consulting HTML & CSS Template

    Business/Consulting HTML & CSS Template

    View: 24    Download: 1   Comment: 0

    Category: HTML-CSS template     Fields: none

    It's elegant Business HTML Template. You can use it for creating Business, Finance, Corporate, Consulting websites or promoting your services. Looks perfect in all major browsers, tablets, and phones. Clean and commented code lets you customize it...

  • Photography Portfolio HTML/CSS Template

    Photography Portfolio HTML/CSS Template

    View: 28    Download: 0   Comment: 0

    Category: HTML-CSS template     Fields: none

    Portfolio and Photography HTML5/CSS template build with latest bootstrap framework , best suited for photographers. Features 3 HTML5/CSS3 Templates Video background for the homepage (YouTube Only) Supersized slideshow for the homepage Built on...

  • Creative Login Form with Validation

    Creative Login Form with Validation

    View: 40    Download: 0   Comment: 0

    Category: HTML-CSS template     Fields: none

    Upturn customized LOGIN FORM & INPUT STYLES is ready for Desktop, tablet and mobile devices. Simple to implement. Just copy the HTML and link to the CSS,JS file. You can easily edit, change and customize them for yourself. For students or anyone else...

  • Login Form Like Facebook

    Login Form Like Facebook

    View: 36    Download: 0   Comment: 0

    Category: HTML-CSS template     Fields: none

    This is a simple Facebook form that can be imported to your site with ease. Please don't forget to give credit to original developer because I really worked hard to develop this project and please don't forget to like and share it if you found it...

  • Custom-able Invoice: Easy to Use

    Custom-able Invoice: Easy to Use

    View: 33    Download: 1   Comment: 0

    Category: HTML-CSS template     Fields: none

    Make billing easy with Free Invoice Template. Professional invoices for your business: Proforma, Service, Sales, Freelance. Please don't forget to give credit to original developer because I really worked hard to develop this project and please don't...

  • Awsome Responsive HTML Pages

    Awsome Responsive HTML Pages

    View: 24    Download: 0   Comment: 0

    Category: HTML-CSS template     Fields: none

    A responsive html pages. The site have self sliding images on the index page. There are drop down menu with icons on them. The site have bootstrap that makes it responsive to different devices .

  • How To Create an Animated Search Form

    How To Create an Animated Search Form

    View: 273    Download: 0   Comment: 0

    Category: HTML-CSS template     Fields: none

    How To Create an Animated Search Form, Learn how to create an animated search form with CSS.

  • How to reset / remove chrome's input highlighting / focus border? used CSS

    How to reset / remove chrome's input highlighting / focus border? used CSS

    View: 224    Download: 0   Comment: 0

    Category: HTML-CSS template     Fields: none

    You have seen that chrome puts a thicker border on :focus but it kind of looks off in my case where I've used border-radius also. Is there anyway to remove that?

 
File suggestion for you
Loading...
File top downloads
Loading...
Loading...
Codetitle - library source code to share, download the file to the community
Copyright © 2018. All rights reserved. codetitle Develope by Vinagon .Ltd