RE: [PHP-DB] Problem with session function: URL Parameter

From: Date: Wed, 26 Sep 2001 15:04:04 +0000
Subject: RE: [PHP-DB] Problem with session function: URL Parameter
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-12727@lists.php.net to get a copy of this message
>-----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. hth -- Jason Wong Gremlins Associates www.gremlins.com.hk Tel: +852-2573-5033 Fax: +852-2573-5851

« previous php.db (#12727) next »