This is a discussion on syntax error using header and SID within the PHP General forums, part of the PHP Programming Forums category; Hi all Can someone tell me what the correct syntax is to pass a Session ID via the header redirect ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all
Can someone tell me what the correct syntax is to pass a Session ID via the header redirect is? Im trying: header( "Location: page2.php?<?echo strip_tags (SID)?>" ) but it isnt working for me and all the docs i can find just deal with tagging it to the end of a hyperlink. Any help would be greatly appreciated! __________________________________________________ ______________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk |
|
|||
|
bob pilly wrote:
> Hi all > > Can someone tell me what the correct syntax is to pass > a Session ID via the header redirect is? Im trying: > > header( "Location: page2.php?<?echo strip_tags > (SID)?>" ) > but it isnt working for me and all the docs i can find > just deal with tagging it to the end of a hyperlink. header("Location: page2.php?" . SID); You should use a complete URL, btw, including http:// and the domain name. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com |
|
|||
|
At 18:33 4-9-03, you wrote:
>Hi all > >Can someone tell me what the correct syntax is to pass >a Session ID via the header redirect is? Im trying: > >header( "Location: page2.php?<?echo strip_tags >(SID)?>" ) You are making a row of mistakes that suggest it is a good idea to read a bit on PHP syntax and how variables are passed over pages. For instance, you are calling a php function such as header(), you are already inside php tags (<?PHP and ?>), or at least you SHOULD be. Then, you work with SID, is that a CONSTANT ? A good place to start is the first chapters of the online php manual on uk.php.net/manual/en and a tutorial on sessions on http://www.phpfreaks.com/tutorials/41/0.php |
|
|||
|
On Thu, 2003-09-04 at 09:33, bob pilly wrote:
> Hi all > > Can someone tell me what the correct syntax is to pass > a Session ID via the header redirect is? Im trying: > > header( "Location: page2.php?<?echo strip_tags > (SID)?>" ) header( "Location: page2.php?". strip_tags( SID ) ); the problem you are having is that you are already inside php tags when you are using the header function and don't need to make new php tags to use the echo statement. and for that matter, you don't need to use the echo statement at all. just append the SID to the end of the location. > but it isnt working for me and all the docs i can find > just deal with tagging it to the end of a hyperlink. > > Any help would be greatly appreciated! > > > > __________________________________________________ ______________________ > Want to chat instantly with your online friends? Get the FREE Yahoo! > Messenger http://mail.messenger.yahoo.co.uk -- Tyler Lane <tlane@lyrical.net> Lyrical Communications -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA/V3ZfnV+u8RFxEIMRAgg5AJ9+a+ApJyKjO/J/bEVuvu+F7ZYH+QCggsa7 cqvl553cQtupVYJTKUIa8Tw= =kNeu -----END PGP SIGNATURE----- |