07
Sep
stored in: PHP/MYSQL
The $_GET variable is used to gather values/data from a form or url.
Information sent using the $_GET varible is visible in the users web browser, for example http://yourdomain.com/?url=http://google.com which has defined http://google.com as the url.
So for example if i was to use the following php code:
<?php
print $_GET['url'];
?>
It will display the domain http://google.com.
You can change this to anything else, you may change the url to name and then add john after = which when requesting for $_GET['name'] will display john.
Leave a Reply
You must be logged in to post a comment.