PC Nerd Posted January 11, 2007 Share Posted January 11, 2007 hi guysim re-writeing my login script as some of you might remember. But my mysqli_query(); returns "Object id #2" . here is my code:[code]<?phpinclude("inc_files/Database_link.inc");if(empty($_POST['User_Name']) || empty($_POST['Password']) || empty($_POST['Valid'])) { die("ERROR 1Invalid Login Details. Click <a href = 'B_A-Home.php' alt = 'Home'>here</a> to return to the Home Page.");}require("inc_files/Login_Pics.inc");$img_post_valid = $_POST['IMG_Valid'];$Image_Validate = $IMAGES["B_A-Login_$img_post_valid"];if($_POST['IMG_Valid'] != $Image_Validate) { die("You did not type in the correct validation image. Click <a href = 'B_A-Home.php' alt = 'Home'>here</a> to return to the Home Page.");}$SQL_Login = "SELECT User_Name, `Password` FROM General_Stats WHERE User_Name = '".$_POST['USer_Name']."'";$Login_Query = mysqli_query($DB_Server, $SQL_Login);echo $Login_Query;#if(empty($Login_Query)) {# die("ERROR 2 There was an error in the Database. You have not been logged in. Click <a href = 'B_A-Home.php' alt = 'Home'>here</a> to return to the Home Page.".mysqli_error($Login_Query));#}#$DB_Login = mysqli_fetch_array($Login_Query);#if(empty($DB_Login)) {# die("ERROR 3 There was an error in the Database. You have not been logged in. Click <a href = 'B_A-Home.php' alt = 'Home'>here</a> to return to the Home Page.".mysqli_error($DB_Login));#}?>[/code]ive commented out the rest of the script, becauase this is the part that isnt working....any help is much appreciated. thankyou in advance Link to comment https://forums.phpfreaks.com/topic/33696-login-script-mysqlierror-reporting-not-working/ Share on other sites More sharing options...
trq Posted January 11, 2007 Share Posted January 11, 2007 [quote]But my mysqli_query(); returns "Object id #2"[/quote]Exactly as expected. Read the manual for [url=http://php.net/mysqli_query]mysqli_query[/url]() to find out why. Link to comment https://forums.phpfreaks.com/topic/33696-login-script-mysqlierror-reporting-not-working/#findComment-157989 Share on other sites More sharing options...
PC Nerd Posted January 11, 2007 Author Share Posted January 11, 2007 dont worry my mistake, thanks anyway. Link to comment https://forums.phpfreaks.com/topic/33696-login-script-mysqlierror-reporting-not-working/#findComment-158007 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.