Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. session_start();
  4. include 'config2.php';
  5. ?>
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <div align="center" style="font: 12px Verdana;"><br />
  8. <?php
  9. $_SESSION['username'] = $_POST['username'];
  10. $_SESSION['password'] = $_POST['password'];
  11. $username = $_SESSION['username'];
  12. $password = md5($_SESSION['password']);
  13. $leshdale = $_POST['username'];
  14. $justchecking = mysql_query("SELECT * FROM users WHERE nickname = '$username' and password = '$password'");
  15. $login = $_POST['login'];
  16. if(isset($login)) {
  17. if (mysql_fetch_row($justchecking) != 0) {
  18. header("Location: p.php?page=home");
  19. echo 'Редактирай профил <br /> ';
  20. }
  21. else {
  22. echo 'Wrong username or password.';
  23. }
  24. }
  25. else {?>
  26. <form action="" method="post">
  27. Потребител:<br />
  28. <input type="text" name="username" /><br />
  29. Парола:<br />
  30. <input type="password" name="password" />
  31. <br /><input type="submit" name="login" value="Влез" style="margin-top: 2px;" />
  32. </form>
  33. <?php
  34. }
  35. ?>
  36. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement