Jump to content

Mysql Error Please Help....


shujjah

Recommended Posts

  • 3 weeks later...

Alright I am getting this errorFatal error: Call to a member function sql_escape() on a non-object in /home/speedyz/public_html/Portal/forums/includes/functions.php on line 146any idea what it means and how it can be solved ? functions.php is posted above this is the script I am using

<?define('IN_PHPBB', true); //Define IN_PHPBBsession_start();// Include the config file... the the php database is seperate from the gameportal database, change the path to the forum db config //include "forums_config.php";   if((!$_POST[username]) || (!$_POST[password])){   echo "<meta http-equiv=\"refresh\" content=\"3; url=login.html\">";   echo "$font $lang_login_messagea";   }include "forums/includes/functions.php";	 $username = $_POST[username];	 $password = $_POST[password];	 $password2= phpbb_hash($password);	 $username_fixed = mysql_real_escape_string($username);	 $md5 = MD5($password);		  $sql = mysql_query("SELECT * FROM phpbb_users WHERE username='$username' AND user_password='$password2'");				   $logincheck = mysql_num_rows($sql);	 while ($row = mysql_fetch_assoc($sql)) {	 $uid = $row[userid];			 session_register(userid);			 $_SESSION[userid] = $row[user_id];			 session_register(username);			 $_SESSION[username] = $row[username];			 echo "<meta http-equiv=\"refresh\" content=\"0; url= index.php\">";			 //$timenow = date("YmdHis");			 //$timenow2 = date("Y-m-d H:i:s");			 //$thetime = $timenow;			 //$thetime2 = $timenow2;	//$exec = "UPDATE user SET last_login=\"$thetime2\" WHERE userid=\"$uid\"";			 //mysql_query($exec);	 }   if (!$logincheck) {   echo "<meta http-equiv= 'refresh' content= '3; url=login.html'>";   echo "<span class=\"content\">$lang_login_messageb";   }?>

Thanks in Advance

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...