Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <IMG SRC="images/members.jpg" WIDTH=992 HEIGHT=182 NAME="Banner">
- <body background="images/membersb.jpg">
- </body>
- </html>
- <?php
- session_start();
- include 'connect.php';
- $username = $_POST['username'];
- $password = $_POST['password'];
- $password = md5(md5($password));
- if ($username&&$password){
- $query = mysql_query("SELECT * FROM members WHERE username='$username'");
- $numrows = mysql_num_rows($query);
- if ($numrows!=0)
- {
- while ($row = mysql_fetch_assoc($query))
- {
- $dbusername = $row['username'];
- $dbpassword = $row['password'];
- $banned = $row['banned'];
- }
- if ($username==$dbusername&&$password==$dbpassword){
- if (!$banned)
- {
- $_SESSION['username'] = $username;
- echo "
- <table border='1'align='center'>
- <div align='center'>
- <tr>
- <option><td><a href='memberslist.html'>Members</a></td>
- <option><td><a href='admin.php'>Admin</a></td>
- <td><a href='changepassword.php'>User Panel</a></td>
- <td><a href='logout.php'>Logout[".$_SESSION['username']."]</a></td>
- </div>
- </tr>
- </table>
- ";
- }
- else
- {
- session_destroy();
- header("Location: banned.php");
- }
- }
- else
- {
- echo "
- <script>
- alert('Incorrect Password!')
- </script>";
- }
- }
- else
- {
- echo"
- <script>
- alert('That user doesn't exist')
- </script>";
- }
- }
- else
- {
- echo"
- <script>
- alert('Please type in username and password!')
- </script>";
- }
- ?>
- <style type="text/css">
- ul
- {
- list-style-type:none;
- margin:0;
- padding:0;
- overflow:hidden;
- }
- li
- {
- float:left;
- }
- a:link,a:visited
- {
- display:block;
- width:130px;
- font-weight:bold;
- color:1c8bda;
- background-color:Black;
- text-align:center;
- padding:5px;
- text-decoration:none;
- text-transform:uppercase;
- }
- a:hover,a:active
- {
- background-color:lightBlue;
- }
- </style>
Add Comment
Please, Sign In to add comment