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 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php