since u have solved ur problem.. i jus want to give u my opinion on ur codes.. sorry to say this, but ur codes are quite messy.. here i paste urs..
require 'incLoc.php';
$Connect = mysql_connect($DBhost,$DBuser,$DBpass);
mysql_select_db("$DBName");
$email = $_GET['email'];
$pass = $_GET['pass'];
//i dun understand y u need to use '%s' while u can directly use the variable
$query = sprintf("SELECT * FROM members WHERE Email ='%s' AND Password ='%s'",
mysql_real_escape_string($email),
mysql_real_escape_string($pass));
$result = mysql_query($query);
//there is a better way to make error checking tho~ :cool:
if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
$numR = mysql_num_rows($result);
if ($numR == 1) {
echo "mess=You have successfully Loged in";
}
else {
echo "mess=Login Failed - Either your login information was incorrect or you have not registered.";
}
thus.. let me show u how i did for my page.. it's actually the same, but in a better way.. it might solve ur server problem.. coz my page run smoothly in both localhost and my server..
Here it goes..
if (@$HTTP_POST_VARS["submit"] <> "") {
$bValidPwd = 0;
$sEmail = @$HTTP_POST_VARS["email"];
$sPassWd = @$HTTP_POST_VARS["password"];
if ($bValidPwd == 0) {
$conn = phpmkr_db_connect(HOST, USER, PASS,DB);
$sEmail = (!get_magic_quotes_gpc()) ? addslashes($sEmail) : $sEmail;
$sSql = "SELECT * FROM `account`";
$sSql .= " WHERE `Email` = '" . $sEmail ;
$rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
//to check whether the user enter the correct information
if (phpmkr_num_rows($rs) > 0) {
$row = phpmkr_fetch_array($rs);
$bValidPwd = 1;
}
phpmkr_free_result($rs);
phpmkr_db_close($conn);
}
//if the login success, the user will be redirect to next page
if ($bValidPwd == 1) {
$HTTP_SESSION_VARS["project1_status"] = "login";
ob_end_clean();
header("Location: Main.php");
exit();
}
else {
//i have a variable call ewmsg - so-called my error message
$HTTP_SESSION_VARS["ewmsg"] = "Incorrect Login or the account is not yet existed";
}
}
I have authored my coding as per ur usage.. why not u try implement these on urs... I think it might solve ur server problem thingy.. Hope my code can solve ur problem clean..
by the way... i'm curios on this~
Thanks for your help I have finally sorted the problem
sorted? or u were trying to say that u have SOLVED it?
Have a gud day avantbard..
Regards, videxx :p