Re: how can I set up session

From: Date: Wed, 28 Mar 2001 20:10:50 +0000
Subject: Re: how can I set up session
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45857@lists.php.net to get a copy of this message
I don't think PHP3 support sessions variables. but if you want a tricky but working solution to pass variables from page to page try this: file1.php <html> .....you file is here... <form name="myform" method="post" action="file2.php"> <input type=hidden name="name" value="foo"> </form> <script> // this will automatically submit and redirect! document.myform.submit(); </script> If you don't want redirection to be automatic, you can link this previous script with any JavaScript event. Now in file2.php, you can read as echo $name .... hope it helps. ""Jacky"" <jacky@activelifestyle.com> wrote in message news:008301c0b7cd$601d8560$6400a8c0@activelifestyle.com... Very stupid question, but I have one variable, say $name = "foo"; and I want that to assign on to session, reditect that to one cgi page and then go to one html page, and I want to have that session value here at this html page, see what I mean? I am using php3. How do I set session up at the first page befoer the redirect happen? Note, query string is not preferred solution here. cheers Jack jacky@activelifestyle.com "There is nothing more rewarding than reaching the goal you set for yourself"

« previous php.general (#45857) next »