Re: Problem with session function: URL Parameter
| From: | Robert Gruber | Date: | Wed, 26 Sep 2001 17:35:34 +0000 |
| Subject: | Re: Problem with session function: URL Parameter | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12745@lists.php.net to get a copy of this message | ||
"Jason Wong" <phplist@gremlins.com.hk> schrieb im Newsbeitrag
news:001401c1469c$7c788440$0100000a@gremlins.com.hk...
> >-----Original Message-----
> >From: Robert Gruber [mailto:gruber.robert@lion.cc]
> >Sent: 26 September 2001 22:19
> >To: php-db@lists.php.net
> >Subject: [PHP-DB] Problem with session function: URL Parameter
> >
> >
> >I would use the session functions with URL parameter but PHP can't
transmit
> >the SID to the link-URL.
> >
> >And this doesn't work:
> >
> ><?php
> >session_id();
> >session_name();
> >session_register("username");
> >session_write_close();
> >echo("<script
> >language=\"JavaScript\">window.location.href=\"admin/admin.phtml?<?
> >php=SID?>
> >\";</script>");
> >?>
> >
> >Result: http://admin/admin.phtml?<?=SID?>
> >
> >PHP doesn't display the correct SID.
> >Instead the string <?=SID?> were displayed!
> >
> >Thank you!!!
> >bye
>
> That's because you're using <? ?> when you're already inside a php block.
>
> Try:
>
> "admin/admin.phtml?php=SID"
>
> instead.
Thank you for your answer but it doesn't work
If have tried:
php=SID
=SID
<?=SID?>
<?php=SID?>
<?=SID?>
<?php=SID?>
>
> hth
> --
> Jason Wong
> Gremlins Associates
> www.gremlins.com.hk
> Tel: +852-2573-5033
> Fax: +852-2573-5851
>