Forum Moderators: coopster
.str_replace("tracking",$_SESSION['tracking'],$link).
I thought I could simply take that string above and replace
header("Location: $externalurl");
with
header("Location: $.str_replace("tracking",$_SESSION['tracking'],$link");
but that does not actually work! I then tried defining a new variable:
$URL = .str_replace("tracking",$_SESSION['tracking'],$link);
header("Location: $URL");
but that didn't work either...
Thoughts?
$URL = str_replace("tracking",$_SESSION['tracking'],$link); //I just removed the period
header("Location: $URL");
Or you can do this:
header("Location: ".str_replace("tracking",$_SESSION['tracking'],$link);
For more information about what is accomplished here, refer to the String Operators Documentation [us2.php.net]
:)