loosing session variables: work still in progress

From: Date: Fri, 28 Sep 2001 06:48:51 +0000
Subject: loosing session variables: work still in progress
Groups: php.general 
Request: Send a blank email to php-general+get-69127@lists.php.net to get a copy of this message
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

« previous php.general (#69127) next »