the most likely problem is the name of the database table being incorrect ..
by the sounds of it, you are able to connect to the database okay, thus indicating that your name+password are correct, but if the name of the database table is correct it would show this kind of error
woah .. err .. that code is really dodgy :/ try this code but edit a few of the links
you need to fix your sql codes,
i also noticed on the script above it said $Check_Username which is different to $check_username
i also question why your code displays the login boxes if the username and pass DO match??
the script below counts how many rows in the database have Username = $username
if the username cant be found, displays an error message saying the username is incorrect
if the username is found, check if there is an entry with that username AND password combination
elseif the username and password combination cannot be found, display an error message saying the password is incorrect (the username must exist if they have gotten this far)
elseif the username + password are correct, show the login successful page
<?php
//Login To Database
include("Database.php");
include("OpenDatabase.php");
//Get The Functions
include("Functions.php");
//The Headers
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
$username=$_GET['username'];
$password=$_GET['password'];
////////////////////////////////////////LOGIN!!!
//Page Title And CSS Theme
echo FlareXhead($uthm,$stitle);
/*
echo "<p align=\"center\">";
$TimeZone="0"; ////Change the TimeZone accordingly!
$New_Time = time() + ($TimeZone * 60 * 60);
$show_date=date("D dS F, Y",$New_Time);
$show_time=date("H:i",$New_Time);
$Hour=date("G",$New_Time);
echo "[size="1"]".date("D d M y)." - $show_time </a>[/size]
";
echo "</p>";
*/
echo "
";
// check if the username and password have been filled in, if they havent, then show the login box
if (($username == "") && ($password == "")){
echo "==========</a>
";
echo "Username: [b]$username[/b]</a>
";
echo "----------</a>
";
echo "Password: [b]$password[/b]</a>
";
echo "==========</a>
";
echo "<a href=\"**LOGIN URL**.php?action=**LOGIN**&username=$username&password=$password\">Login Now!</a>";
}else{
//check the username by counting how many matching rows exist
$check_username = mysql_query("SELECT COUNT(*) FROM members WHERE Username='".$username."'");
$check_password = mysql_query("SELECT COUNT(*) FROM members WHERE Username='".$username."' AND Password='".$password."' ");
// if username does not exist or is blank, then show error output
if ((!$check_username > 0) || ($username == "")){
echo "username cannot be found or you have entered a blank input
";
}
// elseif check whether the username/password combination exist in the database or the password input is blank
if ((!$check_password == "1") || ($password == "")){
echo "password is incorrect or you have entered a blank input
";
}
// elseif double check that the combo does exist .. if the username and pass are in the database, show the successful login page
elseif($check_password == "1"){
echo "LOGIN PAGE
LOGIN PAGE
";
echo "you have successfully been logged in
";
echo "<a href=\"**LINK URL**\">LOGIN</a>
";
echo "LOGIN PAGE
LOGIN PAGE
";
}
// if for some odd reason none of those fit -- should never occur
else {
echo "there was an error somewhere - please report this to the site owner including any details about what you may have done to cause this error";
}
}
echo "</p>";
echo "</card>";
?>
</wml>