Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- <!--
- #form1 {
- text-align: left;
- }
- -->
- body { margin:0px;padding:0px;background:#202020; color:#8e8e8e;font-family:Arial;font-size:12px}
- table { color:#8e8e8e;font-family:Arial;font-size:12px}
- a { color:#8e8e8e;text-decoration:none;}
- input { border:0px; background: #6d6d6d;font-family:Arial;font-size:12px;color:#b2b2b2}
- </style>
- <?php
- include("db.php");
- session_start();
- if($_SERVER["REQUEST_METHOD"] == "POST")
- {
- // username and password sent from Form
- $username=mysql_real_escape_string($_POST['username']);
- $password=mysql_real_escape_string($_POST['password']);
- $password=md5($password); // Encrypted Password
- $sql="SELECT id FROM admin WHERE username='$username' and passcode='$password'";
- $result=mysql_query($sql);
- $count=mysql_num_rows($result);
- // If result matched $username and $password, table row must be 1 row
- if($count==1)
- {
- header("location: welcome.php");
- }
- else
- {
- $error="Your Login Name or Password is invalid";
- }
- }
- ?>
- <form action="index.php" method="post">
- <label>UserName :</label>
- <input type="text" name="username"/><br />
- <label>Password :</label>
- <input type="password" name="password"/><br/>
- <input type="submit" value=" Login "/><br />
- </form>
Add Comment
Please, Sign In to add comment