Goop3630 Posted January 9, 2010 Share Posted January 9, 2010 Hello, I am using a Flash header for my site (don't complain about it) and I can't get the login to work, I finally got it to actually check the database for the information but now it says that the information is not there although I know it is because I looked. <?php if ($_POST['email'] !=""){ include_once "connect_to_mysql.php"; $email = $_POST['email']; $pass = $_POST['pass']; $email = strip_tags($email); $pass = strip_tags($pass); $emial = mysql_real_escape_string($email); $pass = mysql_real_escape_string($pass); $email = eregi_replace("`","",$email); $pass = eregi("`","",$pass); $pass = md5($pass); $sql = "SELECT * FROM `myMembers` WHERE email='$email' AND password='$pass' AND email_activated='1'"; $result = mysql_query($sql); $count = mysql_num_rows($result); if($count > 0){ while($row = mysql_fetch_array($result)){ session_start(); $id = $account["id"]; session_register('id'); $_SESSION['id']=$id; $SLfirstname = $account["SLfirstname"]; session_register('SLfirstname'); $_SESSION['SLfirstname']=$SLfirstname; $email = $account["email"]; session_register('email'); $_SESSION['email']=$email; $my_msg = "all_good"; print "return_mesg=$my_msg&id=$id$memeber_name=$SLfirstname"; } } else { $my_msg = "no_good"; print "return_msg=$my_msg"; exit(); } } ?> [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/187807-login-help/ Share on other sites More sharing options...
tomdchi Posted January 9, 2010 Share Posted January 9, 2010 you misspelled email. $emial = mysql_real_escape_string($email); What version of php are you using. I ask because you are using session_register(). if register globals is off session_register() will not work and you shouldn't use register globals anyway. Link to comment https://forums.phpfreaks.com/topic/187807-login-help/#findComment-991611 Share on other sites More sharing options...
ignace Posted January 9, 2010 Share Posted January 9, 2010 Also eregi is deprecated use preg instead. Link to comment https://forums.phpfreaks.com/topic/187807-login-help/#findComment-991654 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.