Jump to content

pass data from url to url


Don Diego

Recommended Posts

 

 

I want to pass the varying value of "subid" in this url:

 

http://abcwebsite.php?subid=xxxxxx

 

into "source" in this url:

 

http://xyzwebsite.htm?source=xxxxxx

 

The latter page opens using:

 

<?php
header ("location:http://xyzwebsite.htm?login=apin&source=xxxxxx");
?>

 

Howwever, the value of xxxxxx changes unpredictably (not generated by me) so I need to specify it in general terms.

 

Any suggestions as to where to look or what function to use?

Link to comment
https://forums.phpfreaks.com/topic/45807-pass-data-from-url-to-url/
Share on other sites

ok, well if your getting the value from a form, use

 

$_REQUEST array.

 

 

then you need to send from the _GET array in the first value variable, then pass it to the second page

eg

on page with header

 

 

$URL = $_GET['subid']

header("location:http://xyzwebsite.htm?$URL");

 

goo dluc, if you need more help just post

 

 

Thank you kenrbnsn and PC nerd for your suggestions, but I cannot get that to work.

 

The page opens, but there is no value for source=.

 

By contrast, when I include:

 

<input type="hidden" name="subid" value="<?php echo htmlentities($_GET['subid']); ?>" />

 

in the form, the subid value is included in the email.

 

Since it works in emailing from a form, I am baffled as to why ($_GET['subid'] does not also work to transfer the value from url to url.

 

The value for subid is generated upon clicking the link that goes to the form, not by anything in the form itself.

 

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.