SHARE
TWEET

Untitled

a guest May 30th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php session_start(); ?>
  2. <html>
  3. <head />
  4. <body>
  5. <form action='index.php?login=yes' method=POST>
  6. Username: <input type=text name='user'><br />
  7. Password: <input type=password name='pass'><br />
  8. <input type=submit value='go!'>
  9. </form>
  10.  
  11. <?php
  12.    
  13.     $user=$_POST['USER'];
  14.     $pass=$_POST['pass'];
  15.     $login=$_GET['login'];
  16.    
  17.     if($login=='YES'){
  18.         $con=mysql_connect('67.220.217.230','test',");
  19.         mysql_select_db('login');
  20.        
  21.         $get=mysql_query('SELECT count(id) FROM login WHERE user='$user' AND pass='$pass");
  22.         $result=mysql_result($get, 0);
  23.        
  24.         mysql_close($con);     
  25.        
  26.         if ($result!=1) echo"Login failure!";
  27.         else{
  28.             echo "Login success!";
  29.             $_SESSION['user']=$user;
  30.         };
  31.     };
  32.        
  33. ?>
  34.    
  35. </body>
  36. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top