justsomeguy Posted March 5, 2009 Share Posted March 5, 2009 This is on the top of the file: if (!defined('IN_PHPBB')){ exit;} So you can either comment that out, or define a constant in your script called IN_PHPBB. Link to comment Share on other sites More sharing options...
shujjah Posted March 27, 2009 Author Share Posted March 27, 2009 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 More sharing options...
justsomeguy Posted March 27, 2009 Share Posted March 27, 2009 I don't see a method called sql_escape being used in the code you posted. Link to comment Share on other sites More sharing options...
shujjah Posted March 28, 2009 Author Share Posted March 28, 2009 actually that was a code used in functions.php which I included.. but anyways I got it all fixed :)Best Regards,Thanks for all your help Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.