Hi all
Do you know the correct syntax for this: <?php header("Location: http://www.testsite.co.uk/index.php?sid=".$var); ?>
basically this is correct: <?php header("Location: http://www.testsite.co.uk/index.php?sid="); ?>
but what is the correct syntax for adding the $var to the end??
Thank you.
Tate
Correct Syntax.
Moderator: General Moderators
Re: Correct Syntax.
If $_GET["sid"] is supposed to be set to $var, do this:
...or, because you're using double quotes, you can just stick the variable in the string, like so:
Code: Select all
<?php header("Location: http://www.testsite.co.uk/index.php?sid=".$var); ?>Code: Select all
<?php header("Location: http://www.testsite.co.uk/index.php?sid=$var"); ?>Re: Correct Syntax.
thanks, let me try that!
Re: Correct Syntax.
Thanks Syntac!!!!!!!
That works!!.
That works!!.