PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hi,i face some problem that after success login to the page but the seesion id not update at all..isnt my coding is wrong??
can anyone help me??thanks in advance..
$query = 'SELECT * FROM register WHERE username = "'. mysql_real_escape_string($username) . '"';
//
$_SESSION["login"] = true;
$_SESSION["username"] = $data->username;
What fields are inside the 'register' table? Since other session variables are set it's not a session problem, it's also not a problem with the condition (md5($password) == $data->password) or the other values wouldn't be set either, trying to help you here
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
$query = 'SELECT * FROM register WHERE username = "'. mysql_real_escape_string($username) . '"';
//
$_SESSION["login"] = true;
$_SESSION["username"] = $data->username;
What fields are inside the 'register' table? Since other session variables are set it's not a session problem, it's also not a problem with the condition (md5($password) == $data->password) or the other values wouldn't be set either, trying to help you here
my register table gt id,name,username,gender,phone,password,email,address,session_id,date_registered..
i try many different way still cant update the session_id..
thanks for ur help..
try this, I think you are saying that your update sql statement isn't updating the database with the new session id. I think this will solve your problem...
danwguy wrote:try this, I think you are saying that your update sql statement isn't updating the database with the new session id. I think this will solve your problem...
Are you trying to update the session id in the $_SESSION['id'] or are you trying to update it in mysql? when you echo $_SESSION['id'] do you get it displayed?
danwguy wrote:Are you trying to update the session id in the $_SESSION['id'] or are you trying to update it in mysql? when you echo $_SESSION['id'] do you get it displayed?
actually i wanna update the session_id in my sql..