Advertisement
Guest User

Untitled

a guest
Apr 17th, 2017
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?
  2. include "config.php";
  3. $idd = $_POST['id'];
  4.  
  5. $db2 = mysqli_connect($dbhost, $dbuser, $dbpass, $dbdatabase) or die(exit());
  6. $abfrage2 = mysqli_query($db2, "SELECT * FROM user WHERE id LIKE '$idd'");
  7. $rowe = mysqli_fetch_object($abfrage2);
  8.  
  9.  
  10.  
  11. echo $rowe->code;
  12.  
  13.  
  14.  
  15. ?>
  16. <center><h1>Login</h1></center>
  17. <center>
  18. <form action="" method="post">
  19. <input type="text" name="id" required placeholder="Deine ID"><br>
  20. <input type="password" name="code" required placeholder="CODE"><br>
  21. <input type="submit" name="weiter" value="Weiter rätseln">
  22.  
  23.  
  24. </form>
  25. </center>
  26.  
  27.  
  28. <?
  29. $submit = $_POST['weiter'];
  30. $codeee = $row->code;
  31. if(isset($submit)){
  32.  
  33. if($_POST['code'] == $codeee){
  34. echo "Richtig";
  35. }else{
  36. echo "Falsch";
  37. }
  38.  
  39.  
  40. }
  41.  
  42.  
  43.  
  44.  
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement