Advertisement
Guest User

Untitled

a guest
May 5th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.44 KB | None | 0 0
  1. <?
  2. include 'passencode.php';
  3. ?>
  4. <?php if(!session_is_registered('UserCP')) {?><div align="center"><strong>Only members allowed.<br>
  5.     <br>
  6.   </strong>
  7.   <form method="post" action="?op=login"><table width="200" border="0">
  8.     <tr>
  9.       <td width="69">Username:</td>
  10.       <td width="121"><label>
  11.         <input type="text" name="user" id="user">
  12.       </label></td>
  13.     </tr>
  14.     <tr>
  15.       <td>Password:</td>
  16.       <td><label>
  17.       <input type="password" name="pass" id="password">
  18.       </label></td>
  19.     </tr>
  20.     <tr>
  21.       <td>&nbsp;</td>
  22.       <td><label>
  23.         <input type="submit" name="submit" id="submit" value="Submit">
  24.       </label></td>
  25.     </tr>
  26.   </table>
  27.     <br><?php
  28. if(isset($_POST['submit'])) {
  29. $U = $_POST['user'];
  30. $password = $_POST['password'];
  31. $result1 = "SELECT * FROM `accounts` WHERE AccountID='$U' and password='$password'";
  32. $query = mysql_query($result1);
  33. $count = mysql_num_rows($query);
  34. if($count == 1){
  35. session_register("UserCP");
  36. $_SESSION['user'] = $_POST['user'];
  37. echo('Logged in..... Click <a href=?op=user><strong>here</strong></a>'); } else { echo "System Error: Wrong password/username."; } }
  38. ?>
  39.     <div align="left"><br>  
  40.       <em>Welcome to the user panel.</em> From this point you can edit characters, delete characters, and control your site. Please login before doing anything though.<br>
  41.     </div>
  42.   </form>
  43.   <strong><br>
  44.   </strong>
  45.   <table>
  46.   </table>
  47.   </div>
  48.   <?php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement