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" <[EMAIL PROTECTED]> skrev i meddelandet 02e801c19de4$bf9e2000$[EMAIL PROTECTED]">news:02e801c19de4$bf9e2000$[EMAIL PROTECTED]... > 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" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > 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: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]