ok you PHP 313373$, someone take a look at this!

joshg

Golden Member
Jul 3, 2001
1,359
0
0
whoa n/m, lemme see yer warface... I just abolished the header redirects and in place I put javascripties :D works good


Yep that's right, having a small issue...

I'm running the latest version of both PHP and MySQL on Windows 2000. I have a login script that accesses my database, checks to see if a username entered by the user is in the db, and if so, it compares the password they enter... if everything checks out, the script registers a session variable, and then I set the session variable to their id number of their username... I have a header redirect to a new page, welcome.php... if you are trying to log in for the first time using this particular browser session, when you go to the page after the login completes, you get an undefined variable... and yess I am using session_start(); and the undefined variable is the session variable's name...

anyway, so it's undefined.. but then if you click on my link that "logs you out" (unregister and unset the session variable, redirect back to the login form), and then log in again using the same user, when you are redirected to the page everything works fine, and now the session variable in this new page is populated just fine, and it all works great...

anyone know what the deal is? Had some kind of situation like this before?

if you'd like I could post some source .phps files for you to take a look if you wish...

anyone?!? :confused:
 

joshg

Golden Member
Jul 3, 2001
1,359
0
0
ok let's see, this isn't the latest version but the script is basically the same
login processor
welcome script
logout processor

I am getting the error on the welcome.php page, and only the first time I try to log in.. if I click the logout link and then log back in, it all works fine...

any takers?

edit: oh yeah pay no attention to the settype function, it has nothing ado
also, yes for now the connection to localhost is correct, as I am running this on Win2000 pro using IIS for now...
 

SendTrash

Platinum Member
Apr 18, 2000
2,581
0
76
I make a login script for my website.. and it works fine.. I don't understand what's wrong... I can send you my login script.. or even better if you post yours...


 

joshg

Golden Member
Jul 3, 2001
1,359
0
0
does anyone have experience with this kinda stuff... this seems really weird to me, I've never really had this type of problem before