dear sir
when user enters user_id and password he should goto the main form which user_id
is created before where user has created his account as new user already . now my code is taking user_id but if enter different password it is taking that also here i am givening the code please correct it and give to me
<head>
</head>
<body bgcolor="lightblue">
<form action="main1.php3" method="post">
<?
if ($submit)
{
$username="root";
$hostname="localhost";
$dbname="karthik";
$passwrd="";
$link=MYSQL_CONNECT($hostname, $username, $passwrd) OR DIE("Unable to connect to database");
MYSQL_SELECT_DB("karthik",$link) or die ("Unable to select database");
require 'vali.php3';
$check=chknotmty($user_id,"user_id");
echo $check."<br>";
if($check==1)
{
$sql="select user_id,password from user_details where user_id='$user_id'";
$result=mysql_query($sql);
$row=mysql_fetch_Object($result);
if($row->user_id==$user_id && $row->password==$password)
{
echo " <center> welcome to our home page </center>";
echo "<a href=\"main1.php3\">CLICKHERE </a>";
echo "<strong><center><font color=\"black\">$user_id</font></center></strong>";
}
}
else
{
echo "Sorry You are not a registered user \n";
echo "<a href=\"shop3.php3\">Back </a>";
}
}
?>
</form>
</body>