Re: Login script, session problem (I think)

From: Date: Tue, 15 Jan 2002 17:14:41 +0000
Subject: Re: Login script, session problem (I think)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-80588@lists.php.net to get a copy of this message
php 4.* .... 4.03 I think, or something like that first I have a form that directs to login.php, in that file I have session_start(); session_register(admin_allow); session_register(username); session_register(password); then I assign a word to admin_allow and the username and password to the username and password vars(for later use with things like "my settings") and if the username and password above was found in the mysql database I made it to redirect to the admin area, and on every admin page I have <? session_start(); if ( $admin_allow == "thesecretword:p" ) { the stuff in here } else { header("Location: blahblah.php"); } ?> maybe I'm doing this totaly wrong, but I just recently started with php.. :p "Dennis Moore" <dmoore@ravens-nest.com> skrev i meddelandet news:02e801c19de4$bf9e2000$c6d1e2cf@ravensnest.com... > More information is needed... what version of PHP are your running? I bit > of sample code on how you set up your sessions would also be helpful... > > /dkm > > ----- Original Message ----- > From: "Hawk" <hwk@barrysworld.com> > To: <php-general@lists.php.net> > Sent: Tuesday, January 15, 2002 11:19 AM > Subject: [PHP] Login script, session problem (I think) > > > > I made a simple login script which uses MySQL for username and password > > retrieval and that stores the username in a session, the problem is that > > this script only works locally, e.g. I can only login from this computer > but > > not from any other, I have session.use_cookies = 1 and I also have another > > session on the page that stores a counted var so the counter doesn't jump > up > > everytime someone changes page. > > The thing confusing me is that the counter session works global but the > > login only works local.. > > > > Does anyone have an idea how I should solve this? I'm not so good with php > > yet so I might have missed something, but i think it's wierd anyway... :p > > > > please reply as soon as possible. :) > > > > Hawk > > > > > > > > -- > > 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 (#80588) next »