June 27, 201115 yr The 2 types of PHP page I know of are; something.php something.php?somethingelse What is the difference between the 2, should one be used and one not or should they both be used, also when should one be used over the other? Cheers guys
June 27, 201115 yr Author Actually, there's only one type of PHP page, it's "something.php". That "somethingelse" is a GET method data transfered via URL. As far as I'm concerned they both should be used, if you don't mind. so when would you use the GET method?
June 28, 201115 yr Just to be clear, it's best not to transfer sensitive data via a GET url. These stay in your browsers history unless deleted, so for user sensitive information be sure to always use the POST method for transferring data. A better example of where GET is used is in a shopping cart such as http://example.com/category.php?category_id=123 to tell the script which category to show
June 28, 201115 yr uhm, in fact it depends on the webserver configuration, php is an addition to webservers and in most cases a webserver is executing a php script when a requested file has an ending like .php, .php5, .php4, .php3, etc... but many times there is a "proxy" mechanism like mod_rewrite which is redirecting every url to one fixed file (index.php) and then the script is parsing requested url to run expected part of an application then instead of having url's like: http://my.domain.tld/page.php?page=home you can have: http://my.domain.tld/home and its still a php page
July 8, 201115 yr Author Would pages such as 'About Us, and FAQ's' be aboutus.php or something like index.php?=aboutus? And then get that turned into .com/about or should it just be.com/aboutus.php I don't know if I should make all my pages one way or the other.
Create an account or sign in to comment