Re: loosing session variables: work still in progress

From: Date: Mon, 01 Oct 2001 14:38:57 +0000
Subject: Re: loosing session variables: work still in progress
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69465@lists.php.net to get a copy of this message
Hi, my recommendation is placed inline. If register_globals is off, then I suspect session_store() won't work. I don't know it surely. > 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('pw'); // if you meant you want to register the global variable $pw. > session_register($login); session_register('login'); // if you meant you want to register the global variable $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); session_register('admin'); // if you meant you want to register the global variable $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> What does session_name() return? > <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/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#69465) next »