I am trying to get $_GET['subid'] to transfer a variable six digit integer from one url to another.
The process is like this:
A link on a site not mine is clicked opening my page whose url looks like this:
http://abcwebsite.php?subid=xxxxxx
where xxxxxx represents a variable integer of 6 varying digits with no spaces or other characters, but I don't control what the digits are.
Then a link on my page is clicked and another website page not mine opens looking like this:
http://xyzwebsite.htm?source=
source= needs to take on the value of subid.
When I try this:
Code:
<?php header ("location:http://xyzwebsite.htm?login=apin&source=".
(int)$_GET['subid']);
?>
the url shows source=0.
When I try this:
Code:
<?php header ("location:http://xyzwebsite.htm?
login=apin&source=".(htmlentities)$_GET['subid']); ?>
the page will not open.
When I try this:
Code:
<?php header ("location:http://xyzwebsite.htm?
login=apin&source=".$_GET['subid']); ?>
the url shows no value for source=.
When I try this:
Code:
print '<meta http-equiv="refresh"
content="0;URL=http://xyzwebsite.htm?login=apin&source=?'.(int)$_GET
['subid'].'">';
the url shows source=%3F0
On the same page, the following is working fine to capture the value of subid for inclusion in an email:
Code:
<input type="hidden" name="subid" value="<?php echo htmlentities($_GET['subid']); ?>" />
I just can't get anything to work for url to url.