Once you click login you are sent to the same login page. If you have not logged in correctly a message appears at the top of the box.
If you have it sets "goahead" to true. In some code (slightly down from the other but still before the <HTML> tag) I check if goahead is set to true and then start and set a session.
Later on in the ,<head> tags I check again and do a redirect using javascript.
What happens:
I login, I get redirected to the profile page but the session hasn't started!?!
I just took out the redirect and made PHP echo "hi" after setting the session vars.
Sure enough "hi" appeared at the top of the page.
This is the code that does the sessions.
session_start(); $ID = mysql_result($result,0,"ID"); $Username = mysql_result($result,0,"Username"); $_SESSION['ID'] = $ID; $_SESSION['Username'] = $Username;
Thanks in advance.


Sign In
Create Account


Back to top









