Damagedcity.com Posted June 11, 2011 Posted June 11, 2011 try to login but get this error: Fatal error: Call to undefined method database::escape() in /home/damagedc/public_html/authenticate.php on line 52 This is the authenticate part: <a href=login.php>> Back</a>"); } else { $_SESSION['loggedin']=1; $mem=$db->fetch_row($uq); $_SESSION['userid']=$mem['userid']; $IP = $db->escape($_SERVER['REMOTE_ADDR']); $db->query("UPDATE users SET lastip_login='$IP',last_login=unix_timestamp() WHERE userid={$mem['userid']}"); if($set['validate_period'] == "login" && $set['validate_on']) { $db->query("UPDATE users SET verified=0 WHERE userid={$mem['userid']}"); } header("Location: loggedin.php"); } ?> Quote
Danny696 Posted June 11, 2011 Posted June 11, 2011 replace $IP = $db->escape($_SERVER['REMOTE_ADDR']); with $IP = $_SERVER['REMOTE_ADDR']; Quote
Damagedcity.com Posted June 11, 2011 Author Posted June 11, 2011 (edited) Thanks for that That helped but now i got another problem with when i logon. error: Warning: Cannot modify header information - headers already sent by (output started at /home/damagedc/public_html/config.php:13) in /home/damagedc/public_html/authenticate.php on line 58 $db->query("UPDATE users SET verified=0 WHERE userid={$mem['userid']}"); } header("Location: loggedin.php"); } ?> Also a problem on the index header. But i dont see wat i have done wrong here. Warning: mysql_query() [function.mysql-query]: Access denied for user 'damagedc'@'localhost' (using password: NO) in /home/damagedc/public_html/header.php on line 53 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/damagedc/public_html/header.php on line 53 Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/damagedc/public_html/header.php on line 53 $location = mysql_fetch_assoc(mysql_query("SELECT cityname FROM cities WHERE cityid=".$ir['location']."")); Edited June 11, 2011 by Damagedcity.com Quote
lucky3809 Posted June 11, 2011 Posted June 11, 2011 (edited) Your error is Warning: mysql_query() [function.mysql-query]: Access denied for user 'damagedc'@'localhost' (using password: NO) in /home/damagedc/public_html/header.php on line 53 meaning in header.php on line 53 you should change it to $db-> instead of mysql... if it still gives you that error your database info is not right in your config.php and lol @... $location = mysql_fetch_assoc(mysql_query("SELECT cityname FROM cities WHERE cityid=".$ir['location']."")); try : $location = $db->query("SELECT cityname FROM cities WHERE cityid=".$ir['location'].""); Edited June 11, 2011 by lucky3809 Quote
Damagedcity.com Posted June 12, 2011 Author Posted June 12, 2011 Thanks i tried wat u said but i got this error: Fatal error: Cannot use object of type mysqli_result as array in /home/damagedc/public_html/header.php on line 93 i tried fixing it myself and used this and it worked. $location = $db->fetch_row($db->query("SELECT cityname FROM cities WHERE cityid=".$ir['location']."")); Also i still have that login problem if anyone can help Warning: Cannot modify header information - headers already sent by (output started at /home/damagedc/public_html/config.php:13) in /home/damagedc/public_html/authenticate.php on line 58 Quote
mixmaster Posted June 12, 2011 Posted June 12, 2011 you do know you can still log into the game though dont you ? :P Quote
Damagedcity.com Posted June 12, 2011 Author Posted June 12, 2011 yeah but i would like this error sorted Quote
Danny696 Posted June 12, 2011 Posted June 12, 2011 you know, you should either pay money for people to fix the errors, or learn to code, you cant scavenge from people for the whole of the games life. Quote
Ecko Posted June 12, 2011 Posted June 12, 2011 you know, you should either pay money for people to fix the errors, or learn to code, you cant scavenge from people for the whole of the games life. lmfao!!!!!!!!!!!!!!!!!!!!!!!!!! +rep Quote
Damagedcity.com Posted June 12, 2011 Author Posted June 12, 2011 Just fixed the problem thanks for help on the header though:) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.