Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php session_start(); ?>
- <html>
- <head />
- <body>
- <form action='index.php?login=yes' method=POST>
- Username: <input type=text name='user'><br />
- Password: <input type=password name='pass'><br />
- <input type=submit value='go!'>
- </form>
- <?php
- $user=$_POST['USER'];
- $pass=$_POST['pass'];
- $login=$_GET['login'];
- if($login=='YES'){
- $con=mysql_connect('67.220.217.230','test',");
- mysql_select_db('login');
- $get=mysql_query('SELECT count(id) FROM login WHERE user='$user' AND pass='$pass");
- $result=mysql_result($get, 0);
- mysql_close($con);
- if ($result!=1) echo"Login failure!";
- else{
- echo "Login success!";
- $_SESSION['user']=$user;
- };
- };
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement