freeb Posted March 27, 2009 Share Posted March 27, 2009 I still only marginally understand the difference between POST, GET and REQUEST... When you submit a form using the GET method form values will appear in the url. http://localhost/form.php?name=Mr+Smith&age=101&submit=submit GET /form.php?name=Mr+Smith&age=101&submit=submit HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost/form.php With the POST method the form values get sent in the body of request and therefore not shown in the url. http://localhost/form.php POST /form.php HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost/form.php Content-Type: application/x-www-form-urlencoded Content-Length: 35 name=Mr+Smith&age=101&submit=submit Quote Link to comment Share on other sites More sharing options...
jkdelauney Posted March 28, 2009 Share Posted March 28, 2009 If you want to learn php fast, check out W3 Schools PHP. This is how I learned how to use it. They explain the difference between get post and request, and have a good section on PHP with MySQL databases. I would definitely have to second the use of w3schools.com, as that's what I used to learn the little bit of PHP I used in ep502. I really should get around to finishing that thing... if nothing else work out the security issues. :D Quote Link to comment Share on other sites More sharing options...
Lyzon Posted March 28, 2009 Share Posted March 28, 2009 @nullArray, i didnt mean to be harsh lol. just wondered why you using a very outdated version of php. I recommend you download and install wampserver 2 as it comes with php 5.2. @digip, the errors can happen in php 5 but the style in which they are displayed is native to PHP 3 :) Quote Link to comment Share on other sites More sharing options...
digip Posted March 28, 2009 Share Posted March 28, 2009 I recommend you download and install wampserver 2 as it comes with php 5.2. I could be wrong, but I think nullArray uses a MAC, not windows. Personally, I like XAMPP Lite for windows. They even have an OSX version(beta): http://www.apachefriends.org/en/xampp-macosx.html Quote Link to comment Share on other sites More sharing options...
nullArray Posted March 28, 2009 Author Share Posted March 28, 2009 I could be wrong, but I think nullArray uses a MAC, not windows. Personally, I like XAMPP Lite for windows. They even have an OSX version(beta): http://www.apachefriends.org/en/xampp-macosx.html Oh you know me too well. I used a Espresso. Quote Link to comment Share on other sites More sharing options...
digip Posted March 28, 2009 Share Posted March 28, 2009 Oh you know me too well. I used a Espresso. I thought Expresso was just a text editor though, right? xampp is Apache, PHP, MySQL and Pear so you can run and test websites on your local workstation before deployment to the web. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.