any body tell me where use in PHP this function $_GET on websitedesign and why I use this.
tell me ?
thanks and advanced.
It's not a function, but a reserved variable in php.
Basically, when you set the method of your form output as "get" instead of "post", you can use this variable to retrieve the form contents.
If your html contained:
... <form action="process.php" method="get"> <input type="text" name="email" /> <input type="submit" name="submit" value="Submit" /> </form> ...
...and let's say a visitor on your site typed in their email and pressed submit. At this point, the contents of the form are sent to "process.php". Let's just make it simple and have it echo the data back to the visitor.
<?php echo "The email you entered was ", $_GET['email'], "."; ?>
You can find a more detailed description here: http://php.net/manual/en/reserved.variables.get.php Hope this helps.
As WM says. Data also taken from url querystrings:
$_GET //this is 6
$_GET //this is 8
I wouldn't use get for forms unless you're creating a search engine maybe. I think urls are limited to 255 chars (http://en.wikipedia.org/wiki/Query_string#Compatibility_issues)? I may be wrong, but anyway, sending form data by get may mean that your data is cut off at the knees.