minus84 Posted August 12, 2010 Share Posted August 12, 2010 hi im having trouble with my login script i keep getting the errors Deprecated: Function session_register() is deprecated in C:\wamp\www\login.php on line 53 Deprecated: Function session_register() is deprecated in C:\wamp\www\login.php on line 57 Deprecated: Function session_register() is deprecated in C:\wamp\www\login.php on line 61 i just wanted to knw wot they mean the page styll runs ok, is there any way i can make it work $sql = mysql_query("SELECT * FROM myMembers WHERE email='$email' AND password='$pass' AND email_activated='1'"); $login_check = mysql_num_rows($sql); if($login_check > 0){ while ($row = mysql_fetch_array($sql)){ $id = $row["id"]; session_register('id'); $_SESSION['id'] = $id; $firstname = $row["firstname"]; session_register('firstname'); $_SESSION['firstname'] = $firstname; $email = $row["email"]; session_register('email'); $_SESSION['email'] = $email; mysql_query("UPDATE myMembers SET last_log_date=now() WHERE id='$id'"); $my_msg="Hello $firstname, you have succesfully logged in"; //print "return_msg=$my_msg&id=$id&firstname=$firstname"; } // close while } else{ $my_msg="Error Your Password Or Email Did Not Match"; // print "return_msg=$my_msg"; exit(); } } also im having trouble with my my_msg variable it does not seem to show up i keep gettin error Link to comment https://forums.phpfreaks.com/topic/210587-login-errors-and-variable-no-show/ Share on other sites More sharing options...
petroz Posted August 12, 2010 Share Posted August 12, 2010 session_register is no longer used in php. You can set other values in your php session like so. $_SESSION['color']='red' Link to comment https://forums.phpfreaks.com/topic/210587-login-errors-and-variable-no-show/#findComment-1098656 Share on other sites More sharing options...
Zagga Posted August 13, 2010 Share Posted August 13, 2010 Hi minus84, As Petroz said, you can simply remove all of your session_register statements. When you say you are having trouble with the variable, could you be a bit more specific? Zagga Link to comment https://forums.phpfreaks.com/topic/210587-login-errors-and-variable-no-show/#findComment-1098695 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.