get method and post method
TRANSCRIPT
Disclaimer: This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocument of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .Ltd
Week Target Achieved
1 40 28
2
3
Typing Speed
Jobs Applied
# Company Designation Applied Date Current Status
1
2
3
GET METHOD AND POST
METHOD
SARBAZALI.N
www.facebook.com/Sarbaz
ali.sarbaz
twitter.com/sarbaz_ali
in.linkedin.com/in/
9037896770
GET method
• GET Method is less secure because information sent from a form with the GET method is visible to every one.
• The GET Method has limits on the amount of information to send because URL lengths are limited.
• The browser appends the data to the URL.
• The GET method can’t be used to send binary data,likeimages or Word documents,to the server
• In the GET method page and encoded information are separated by the question mark (?) sign.
• First of all we create a PHP file which is called by the Html page later.
<html>
<body bgcolor="pink">
Welcome <?php echo $_GET["name"];?>.<br/>
You are <?php echo $_GET["class"];?> Qualified !!!
</body>
</html>
Example of GET method
• The above file is saved with the “get.php” name,which is called by the HTML page later.
<html><body bgcolor="pink"><table><form action=“get.php" method="get"><tr><td>Name:<input type="text" name="name"/></td></tr><tr><td>Class :<input type="text" name="class"/></td></tr></table><input type="submit" value="Submit"/></form></body></html>
GET Method
• You will put the URL in te web browser like as: http://localhost/FolderName/get.html.
• Now you will fill txt like as name and class.When you click on the submit button then you will see your browser URL.
GET &POST Method
• Using the GET and POST methods , the browser client can send data to the web server.
• PHP the GET and POST methods are used to retrieve information from forms , such as user input.
• These methods are used data handling forms.
POST Method
• POST Method is Secure because information sent from a form with the POST method is invisible to every one.
• The POST Method has no limits on the amount of information to send because URL lengths are unlimited.
• The browser doesn’t append the data to the URL.
• The POST method can be used to send binary data,like images or Word documents,to the server
• First of all we create a PHP file which is called by the Html page later.
<html>
<body bgcolor="pink">
Welcome <?php echo $_POST["name"];?>.<br/>
You are <?php echo $_POST["class"];?> Qualified !!!
</body>
</html>
• The above file is saved with the “post.php” name,which is called by the HTML page later.
<html><body bgcolor="pink"><table><form action="post.php" method="post"><tr><td>Name:<input type="text" name="name"/></td></tr><tr><td>Class :<input type="text" name="class"/></td></tr></table><input type="submit" value="Submit"/></form></body></html>
POST Method
• You will put the URL in te web browser like as: http://localhost/FolderName/get.html.
• Now you will fill txt like as name and class.When you click on the submit button then you will see your browser URL.
If this presentation helped you, please visit our page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)Mavoor Road, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550
NC Complex, Near Bus StandMukkam, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550
Start up VillageEranakulam,Kerala, India.
Email: [email protected]