<html>
<head>
<link rel="stylesheet" type="text/css" href="ibuyhomeadmin.css"/>
</head>
<body>
<center><img src="cooltext1100105710.png"/></center>
<center>
<form method="post">
<br/>
<table border="1px">
<tr>
<th>Admin Login </th></tr>
</br>
<tr>
<td>Email <input type="text" name="email"/>
</td>
</tr>
<tr><td>Password <input type="password" name="password"/>
</td>
</tr>
<tr><td><center>
<input type="submit" name="btn" value="login"/></center></td></tr>
</table>
</center>
</form>
</body>
</html>
<?php
if(isset($_POST['btn']))
{
mysql_connect('localhost','root');
mysql_select_db('ibuyhome');
$query="select*from admin where username='".$_POST['email']."' and password='".$_POST['password']."'";
$data=mysql_query($query);
if(mysql_num_rows($data)==0)
{
header('location:home.php');
}
else
{
echo"wrong emailid or password";
}
}
?>
<head>
<link rel="stylesheet" type="text/css" href="ibuyhomeadmin.css"/>
</head>
<body>
<center><img src="cooltext1100105710.png"/></center>
<center>
<form method="post">
<br/>
<table border="1px">
<tr>
<th>Admin Login </th></tr>
</br>
<tr>
<td>Email <input type="text" name="email"/>
</td>
</tr>
<tr><td>Password <input type="password" name="password"/>
</td>
</tr>
<tr><td><center>
<input type="submit" name="btn" value="login"/></center></td></tr>
</table>
</center>
</form>
</body>
</html>
<?php
if(isset($_POST['btn']))
{
mysql_connect('localhost','root');
mysql_select_db('ibuyhome');
$query="select*from admin where username='".$_POST['email']."' and password='".$_POST['password']."'";
$data=mysql_query($query);
if(mysql_num_rows($data)==0)
{
header('location:home.php');
}
else
{
echo"wrong emailid or password";
}
}
?>
0 comments:
Post a Comment