Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.