Jump to content

Tom8001

Members
  • Posts

    205
  • Joined

  • Last visited

Everything posted by Tom8001

  1. It's ok it's on localhost and no i do not get any errors with this, what happens is i have changed my user level in phpmyadmin and it does not change anything the code for the ban system at the bottom is not working i'm not sure if i need to send a query to the database it just redirects to the index.php page and not the banned.php page. If you need me to paste anything else in please ask
  2. You could try this <div class="work-item" data-groups=/["all", "webdesign"]' onClick="example()"> <script> function example() { window.open("http://example.com", "_blank"); } </script>
  3. <?php require 'connect.php'; if(isset($_POST['submit'])) { $username = $_POST['username']; $password = $_POST['password']; //Prevent hackers from using SQL Injection $username = stripslashes($username); $password = stripslashes($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $sql = "SELECT * FROM $tbl_name WHERE username='$username' AND password='$password'"; $result = mysql_query($sql); $count = mysql_num_rows($result); $user_level = $_GET['user_level']; $_SESSION['user_level'] = $user_level; if($count == 1) { $_SESSION['username']; $_SESSION['password']; header("Location: index.php"); } else { echo "Please check the username and password you entered is correct."; } if($_SESSION['user_level'] == 0) { $_SESSION['username']; $_SESSION['password']; header("Location: index.php"); } else if($_SESSION['user_level'] == -1) { die(); header("Location: banned.php"); } else if($_SESSION['user_level'] < -1) { die(); echo "An error has occurred please contact your administrator."; } else if($_SESSION['user_level'] == 1) { $_SESSION['username']; $_SESSION['password']; header("Location: admin.php"); } } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.