Alright, since I want to remove register_globals from my server, I am attempting to change over some code from the old session_is_registered stuff to the new $_SESSION stuff.
However, I have run into one snag that I cannot seem to fix.
Previously, when a user logged in, a built in function would perform session_is_registered on the $valid_user variable. I would then set the $valid_user variable to equal the username of the user. Then, I could retrieve the user's information from:
$result = mysql_query("select first_name, last_name, username from users where username='$valid_user'");
$row = mysql_fetch_assoc($result);
print("Logged in as $valid_user (" .$row["first_name"]. " " .$row["last_name"]. ") ");
Now, since I want to use $_SESSION, I have converted all of my code successfully except for this part (duplicated from above):
$result = mysql_query("select first_name, last_name, username from users where username='$valid_user'");
Basically, how do I replace the '$valid_user' reference with $_SESSION['valid_user'] ? I am not getting the syntax right.
Thanks