Advertisement
Guest User

Untitled

a guest
Mar 27th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <?
  2. session_start();
  3. include('connect.php');
  4. if (isset($_POST['click'])) {
  5. $login=@$_POST['username'];
  6. $pas=@$_POST['password'];
  7. $sel = "SELECT * FROM user WHERE username = '$login' and password='$pas'";
  8. $res = mysql_query($sel);
  9. $num = mysql_num_rows($res);
  10. if($num==0)
  11. {
  12.  
  13. }
  14. else {
  15. $_SESSION['username']="makson";
  16. echo $_SESSION['username'];
  17. }}
  18. ?>
  19. <!DOCTYPE html>
  20. <html>
  21. <head>
  22. <lang="uk">
  23. <meta charset="windows-1251">
  24. <link rel="icon" type="image/png" href="/Pic/play.ico" />
  25. <link rel="stylesheet" href="CSS/auth.css" type="text/css">
  26. <title>Max Login</title>
  27. </head>
  28. <body>
  29. <div id="control_bar">
  30. <a href="start.php" id="linkhref">Home</a>
  31. <a href="Cataloge.php" id="linkhref">Cataloge</a>
  32. <a href="about.php" id="linkhref">About Us</a>
  33. <a href="Index.php" id="linkhref">Authorization</a>
  34. </div>
  35. <div class="loginbox">
  36. <img src="/Pic/logo_man.png" class="avatar" >
  37. <h1>Authorization</h1>
  38. <form method="POST">
  39. <p>Username</p>
  40. <input type="text" required name="username" placeholder="Enter Username">
  41. <p>Password</p>
  42. <input type="password" required name="password" placeholder="Enter Password">
  43. <input type="submit" name="click" value="Login">
  44. <a href="index2.php">Registration</a>
  45. </form>
  46. </div>
  47. </body>
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement