Re: SESSIONS

From: Date: Thu, 02 May 2002 21:12:57 +0000
Subject: Re: SESSIONS
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95769@lists.php.net to get a copy of this message
Javascript cannot interact with PHP. You have to realise that the PHP code has been already executed long before the javascript gets a chance to. Mike Morten Nielsen wrote:
Hi, I got a php and a javascript page. In the PHP page I register a SESSION call 'info'. I would then like to put a value into 'info' in my javascript page. Is that possible? I have tried the following: <?php $INFO["value"]=2; ?> And that works fine. But when I have an IF statement like: if(x==1) { $INFO["value"]=1; } else { $INFO["value"]=2; } My INFO always gets the value 2 even though x is 1. Can anyone help? Thanks, Morten


« previous php.general (#95769) next »