Receiving GET parameters

From MyWiki
Revision as of 19:10, 14 September 2014 by George2 (Talk | contribs)

Jump to: navigation, search

< source "lang=php">


<html> <head><title>PHP Get Results</title></head> <body> <?php // Show all URL parameters (and // all form data submitted via the // 'get' method) foreach($_GET as $key=>$value){ echo $key, ' => ', $value, "
n"; } // Show a particular value. $id = $_GET['id']; if($id) { echo '<p/>ID: ', $id, "
n"; } else { echo '

No ID parameter.

'; } ?> </body> </html>