Re: loosing session variables: work still in progress

From: Date: Fri, 28 Sep 2001 13:21:19 +0000
Subject: Re: loosing session variables: work still in progress
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69172@lists.php.net to get a copy of this message
I'm having the exact same problem I have determined that everytime session_start() is called, a new session ID is created even if the PHPSESSID cookie or variable is passed to the next page. It's as if it's ignored. What server configuration do you have? Someone told me that they took the sample code I posted and tried it on his server and it worked fine. On 9/28/2001 2:48 AM this was written: > > Hi, > I still have a problem I've been working on for a while now. My session > variables still don't go through. Here is the code: > > INDEX.PHP > ========== > > <html> > <body> > <br><center><H1><a > href=index2.php>Entrer!</a></H1></center><BR> > <form method="post" action="testadmin.php" > target="_parent"> > Login <input type="text" name=login><p> > Pass <input type="password" name=pw><p> > <input type="submit" value="Admin"></form> > </body> > </html> > > > TESTADMIN.PHP > ================ > > <? > session_start(); > session_register($pw); > session_register($login); > > /*test the admin connection to the DB */ > mysql_connect(localhost,php,script); > $result=mysql_db_query("mp3lib","select username,pass from usr_tbl where > username='$login'"); > $row = mysql_fetch_array($result); > > if ($pw=$row["pass"]){ > $admin='y';$grant='Accordé'; > } else { > $admin='n';$grant='Refusé'; > } > > > session_register($admin); > $adm=$admin; > mysql_close(); > ?> > > <html> > <BODY> > Vérification des droits de contribution en cours......<? echo $grant;?><P> > <a href="index2.php?<? echo session_name()."=".session_id(); > ?>">Ok</a> > </body></html> > > > INDEX2.PHP > =========== > > <? session_start(); ?> > <html> > <frameset cols="280,*" frameborder="NO" border="0" > framespacing="0"> > <frame src=menu.php?<? echo session_name()."=".session_id(); ?> name=artnav > scrolling="no" noresize> > <frame src=pub.html name=resnav> > </frameset> > </html> > > > MENU.PHP > ========== > > <? session_start(); ?> > <html><body> > <? echo $login; ?> > </body></html> > > > The variables are getting lost. I loosing my mind as well and I may be too > much into the problem to see it properly. Please HELP! Feel free to > comment,advise and send code sample. > > Regards, > Michael -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

« previous php.general (#69172) next »