<?php
$connect = mysql_connect("localhost","root","");
$database = mysql_select_db(asd);
$name = $_POST['_username'];
$password = $_POST['_password'];
if(isset($_POST["search"]))
{
$sel = "SELECT * FROM s WHERE a='".$name."' AND ab='".$password."'";
$query = mysql_query($sel);
$row = mysql_fetch_array($query);
if($row["a"]==$name && $row["ab"]==$password)
{
echo "Welcome";
}
else
{
echo"Your password is wrong";
}
}
echo "<form action='#' method='post'>
username: <input type='text' name='_username' /><br>
password: <input type='text' name='_password' /><br>
<input type='submit' value='Search' name='search' /> </form>";
?>
No comments:
Post a Comment