that is the complete copy of my code. only 'localhost', 'root' and password were changed at time of upload, other wise of localhost (in my pc) it works fine
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[
www.w3.org];
<html xmlns="[
www.w3.org];
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcom Page</title>
<link href="babycss.css" rel="stylesheet" type="text/css" />
</head>
<div id="banner"></div>
</head>
<body>
<form action="index.php" method="post">
<div id="sidebar">
<br />
<div id="header">
<h3> You may <a href="signup.php"> click here </a> to signup if<br />
already not a member </h3>
</div><br />
<br />
</div>
<center>
<h1> Enter ID and Password if already a member</h1>
<table>
<tr>
<td>Enter Login ID </td> <td> <input type = "text" name = "txtID" /></td>
</tr>
<tr>
<td> Enter Password </td> <td> <input type = "text" name = "txtPass"/> </td>
</tr>
<tr>
<td></td>
<td>
<input type = "submit" name = "btnLogin" value = "Login"/>
</td>
</tr>
<p> </p>
<p> </p>
</center>
</form>
<?php
if(isset($_POST['btnLogin']))
{
$con = mysql_connect('sohaibtoosy.zxq.net', 'sohaib','***********'or die ("not connected"
);
mysql_select_db('cvDatabase',$con);
$qry=mysql_query("select * from logintable"
;
$userid = $_POST['txtID'];
$userpass = $_POST['txtPass'];
while($search1=mysql_fetch_row($qry))
{
if($userid == $search1[1] && $userpass == $search1[2])
{
header('location:cvUploadForm.php');
}
else
if($userid != $search1[1] || $userpass != $search1[2])
{
echo"<tr>";
echo"<td></td><td>";
echo "<div id='errorBox'>";
echo " <h3>Login ID or Password is invalid </h3>";
break;
echo "</div>";
echo"</td>";
echo"</tr>";
}
}
}
?>
</table>
</body>
</html>