Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. <form method="post" action="login2.php">
  2. <div align="left">
  3. <p align="center">Όνομα Χρήστη:</br>
  4. <input type="text" name="username">
  5. </br>
  6. </p>
  7. <p align="center">Κωδικός Πρόσβασης:</br>
  8. <input type="password" name="password">
  9. </br>
  10. </p>
  11. <p align="center">
  12. <input type="submit" value="Σύνδεση">
  13. </p>
  14. </div>
  15. </form>
  16.  
  17.  
  18.  
  19.  
  20. LOGIN 2
  21.  
  22. <?php
  23. include ('functions.php');
  24. $username = $_POST['username'];
  25. $password = $_POST['password'];
  26.  
  27. if (login($username, $password))
  28. { session_start();
  29. $_SESSION['user'] = $username;
  30. echo "ok";
  31. }
  32. else
  33. {
  34. echo "lathos";
  35. }
  36. ?>
  37.  
  38.  
  39. Kai meta exw
  40.  
  41. include('functions.php');
  42. if(check_user());
  43. {
  44. display_comments();
  45. ?>
  46. <form method="post" action="sxoliofashion.php">
  47. <TEXTAREA NAME="comment" COLS=40 ROWS=6></TEXTAREA>
  48. <input type="submit" value="Sxoliase">
  49. </form>
  50. <?php
  51. }
  52. ?>
  53.  
  54.  
  55. STO SXOLIOFASHION.php
  56.  
  57. include('functions.php');
  58. if(check_user());
  59. {
  60. display_comments();
  61. $comment = $_POST['comment'];
  62. echo $_SESSION['user'];
  63. insert_comment($_SESSION['user'], $comment);
  64. }
  65. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement