submitted by: Guest

PHP: passing variables via url

Pass variables to a page using the question mark, for example mypage.php?value=hello. Access these variables with the _GET command.


code snippet:
<?php
// for example: thispage.php?word=abracadabra

$val $_GET['word'];
echo 
"the word is: $val";

?>

sample output:
the word is: abracadabra