Posted on Wednesday 25th February 2009 at 09:05 PM
sean04
sean04
i took the login.php code and copied it to a file called profile.php. when a user logs in i want them to login at login.php but get redirected to profile.php

i already did what you suggested i do peza BUT it only works on firefox...

when i try it on IE it takes me from login.php to profile.php but once it gets to profile.php it asks me to login again.
Posted on Wednesday 25th February 2009 at 07:04 PM
peza
peza
sean i don't see why you could't change

PHP Code
1
echo "<meta http-equiv='Refresh' content='2; URL=login.php'/>";


to

PHP Code
1
echo "<meta http-equiv='Refresh' content='2; URL=YOURLINK.php'/>";
Posted on Wednesday 25th February 2009 at 05:33 PM
Adam981
Adam981
Well the way they have it set up is to display the links and such in the login page, ud prob have to re-write it all.. meaning that have your login form on login.php and everything else on profile.php

then just point ur login form to profile.php

that would be my guess.
Posted on Wednesday 25th February 2009 at 02:21 PM
sean04
sean04
one more thing. what would i do if i wanted the login page to redirect to a different page. right now it just goes from the login.php to login.php. i want it to go from login.php to profile.php.

i tried copying all the code from login.php to profile.php but that only worked on firefox. if i try it on IE it goes from the login.php but then you have to log in on profile.php to.

any ideas?
Posted on Tuesday 24th February 2009 at 11:00 PM
sean04
sean04
i got it working! thanks MOD-Shadow
Posted on Tuesday 24th February 2009 at 10:54 PM
sean04
sean04
thanks for the code.

now when i click register it says "Field 'age' doesn't have a default value"

any idea why it said that?
Posted on Tuesday 24th February 2009 at 09:35 PM
ShadowMage
ShadowMage
Seems there is a problem with the query then.

Find:
Code

$adduser = mysql_query("INSERT INTO `members` (`username`, `password`, `email`, `userlevel`) VALUES('$username','$password','$email','2')");


Replace with:
Code

$adduser = mysql_query("INSERT INTO `members` (`username`, `password`, `email`, `userlevel`) VALUES('$username','$password','$email','2')") or die(mysql_error());


Find:
Code

$adduser = mysql_query("INSERT INTO `members` (`username`, `password`, `email`) VALUES('$username','$password','$email')");


Replace with:
Code

$adduser = mysql_query("INSERT INTO `members` (`username`, `password`, `email`) VALUES('$username','$password','$email')") or die(mysql_error());


This will make the two queries return with errors if one is found.
Posted on Tuesday 24th February 2009 at 02:27 PM
sean04
sean04
no. i just changed the username and password and database.

the thing is is that the verification code and the user name gets put into the verification table... its just the register info like username passowrd and email that dont.
Posted on Tuesday 24th February 2009 at 02:13 PM
Adam981
Adam981
did u change the database at all?
Posted on Tuesday 24th February 2009 at 05:30 AM
sean04
sean04
any help would be appreciated. and this might be a dumb question be could the problem be that my mysql is password protected instead of no password.

like i said i have got this code to work before.

if that not possible my coding is the 2 links above.