*****this is my php page NAME: auth1.php**************
Code: Select all
<html>
<body>
<?
$user = $_POST['user']; //post user name
$pass = $_POST['pass']; // post pass
$connection = mysql_connect(localhost, "", "");
mysql_select_db('login') or die("cannot select a database");
$get = mysql_query(SELECT * FROM login_info WHERE usr = '$user' and pass = '$pass');
$result =mysql_result($get, 0);
$close = mysql_close($connection);
if ($result != 1) echo "login failure";
else {
echo "Suceess";
};
?>
</body>
</html>******this is my form page : login_page.php ***********************
Code: Select all
<form action="auth1.php" method="post" name= "form1">
User name <input type="text" name = "user" />
Password <input type="text" name = "pass" />
<input type="submit" value = "submit" />
</form>