Jump to content

php get url info


Rifts

Recommended Posts

You'd probably want to use $_GET like this:

<?PHP

  $name = $_GET['name']; //### Will now be "joe"
  $size = $_GET['size']; //### Will now be "small"

  echo 'Name: ' . $name . ' <br>';
  echo 'Size: ' . $size;
?>

 

Of course you will have to check to make sure the query paramter exists using isset.

 

Regards, PaulRyan.

Link to comment
https://forums.phpfreaks.com/topic/257322-php-get-url-info/#findComment-1318974
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.