<?php
if(isset($_POST['button']))
{
$user_name=$_POST['user_name'];
$pass=$_POST['pass'];
include('connect.php');
//echo md5('pass');
$query1="select user_id from profile where user_name=\"$user_name\" and pass=MD5(\"$pass\")";
//echo $query1;
$result1=mysql_query($query1);
if(mysql_num_rows($result1)>0)
{
echo "You are logged in";
//redirect
//session start
}
else
{
echo "Wrong username and password please try again.";
}
}
?>
<form id="form1" name="form1" method="post" action="login.php">
<p>Username
<label>
<input type="text" name="user_name" id="textfield" />
</label>
</p>
<p>Password
<label>
<input type="password" name="pass" id="textfield2" />
</label>
</p>
<p>
<label>
<input type="submit" name="button" id="button" value="Login" />
</label>
</p>
</form>
Simple login using php
Subscribe to:
Post Comments (Atom)
-
Why do niggers wear wide brimmed hats? So birds won't shit on their lips. How do you stop black kids from jumping on your bed? Put Velcr...
-
php, tutorial, sql, video, css, user, login, cookies, lifeg0eson666, marcus, recck, youtube, online, science, A PHP Tutorial creating a User...
-
Building a CMS with PHP and MYSQL Pat 2 video, php tutorials video, php and mysql to make cms video
No comments:
Post a Comment