Don Diego Posted April 5, 2007 Share Posted April 5, 2007 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? Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted April 5, 2007 Share Posted April 5, 2007 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 Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 5, 2007 Share Posted April 5, 2007 Write it as: <?php header ("location:http://xyzwebsite.htm?login=apin&source=" . $_GET['subid']); ?> Ken Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted April 5, 2007 Share Posted April 5, 2007 good point, its much simpler than mine. if confused, always ask the expert!!!!! Quote Link to comment Share on other sites More sharing options...
Don Diego Posted April 6, 2007 Author Share Posted April 6, 2007 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. Quote Link to comment Share on other sites More sharing options...
joquius Posted April 6, 2007 Share Posted April 6, 2007 Can you post more of the code? Quote Link to comment Share on other sites More sharing options...
Don Diego Posted April 6, 2007 Author Share Posted April 6, 2007 There is no more code. This is the only code in the php file that exists for this issue: <?php header ("location:http://xyzwebsite.htm?login=apin&source=" . $_GET['subid']); ?> What else could be needed? Should a different function be used? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.