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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.