Jump to content

login script - mysqlierror reporting not working


PC Nerd

Recommended Posts

hi guys

im re-writeing my login script as some of you might remember.  But my mysqli_query(); returns "Object id #2" .  here is my code:

[code]<?php

include("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

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.