Jump to content

Receiving Values via URL


RogerInHawaii

Recommended Posts

Within some PHP code I'm constructing a URL that includes some variables that I want to pass along with the URL. Something like www.MyWebSite.com/PageTwo.php?Param1=32.  I intend to use this constructed URL within a META tag that will cause it to jump to that page. For example:

 

echo '<META http-equiv="refresh" content="0;URL=www.MyWebSite.com/PageTwo.php?Param1=32">';

 

That works fine. It does indeed jump to that page an dthe parameter is indeed included in the URL when it gets there.

 

But how then do I retrieve the values I passed? How do I get that Param1=32?

I initially thought that this would constitute something comparable to a GET type of form submit, so that the values would be available via the PHP $_GET function ( e.g. $TheParam = $_GET['Param1'] ) but that doesn't work.

 

Is there a method for retrieving parameters passed by URL? Or, alternatively, is there a way I can get that META tag to do a GET type submit?

 

 

Link to comment
https://forums.phpfreaks.com/topic/55920-receiving-values-via-url/
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.