Guest User

Untitled

a guest
Mar 6th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include ("loginpswetc.php");
  4.  
  5. $user=$POST['user'];
  6. $pass=$POST['pas'];
  7.  
  8. if ($user=="" or $pass=="") {
  9. $ok=0;
  10. echo"
  11. <div align=center>
  12. <br />
  13. <form action=index.php method=POST>
  14. User<br />
  15. <input type=text name=user id=user></input><br /><br />
  16. Pass<br />
  17. <input type=password name=pas id=pas></input><br />
  18. <br />
  19. <input type=submit value=Go></input></form>
  20. </div>
  21. ";
  22.  
  23. } else {
  24.  
  25. $ker=mysql_query("SELECT code FROM user WHERE username='$user'");
  26.   while($psw=mysql_fetch_array($ker)); {
  27.     if($pass==$psw[0]) {$ok=1;}
  28.     else { echo"<div align=center><img src=error.jpg width=400 height=300></div>"; }
  29.       }
  30. }
  31.  
  32. if ($ok==1){ echo"working";
  33.  
  34. }
  35.  
  36. ?>
Add Comment
Please, Sign In to add comment