Advertisement
Guest User

Untitled

a guest
Mar 14th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. <?php
  2. $host="localhost";
  3. $user="root";
  4. $password="";
  5. $adb="prisijungimai";
  6.  
  7. mysql_connect($host,$user,$password);
  8. mysql_select_db($adb);
  9. if(isset($_POST['userid'])){
  10. $uname=$_POST['userid'];
  11. $password=$_POST['pswrd'];
  12. $sql="select * from prisijungimas where user='".$uname."' AND Pass ='".$password."' limit 1";
  13. $result=mysql_query($sql);
  14. if(mysql_num_rows($result)==1){
  15. echo "<script>alert('Sekmingai prisijungete');</script>";
  16. }
  17. else{
  18. echo "<script>alert('Blogas prisijungimas arba slaptazdois');</script>";
  19.  
  20. }
  21. }
  22. ?>
  23.  
  24. <!doctype html>
  25. <html>
  26. <head>
  27. <title>Batoneliu svetaine</title>
  28. <style type="text/css"></style>
  29.  
  30.  
  31. <link rel="stylesheet" type="text/css" href="style.css">
  32.  
  33.  
  34.  
  35. <meta charset="=utf-8">
  36. </head>
  37. <body>
  38.  
  39. <button class="button">Namai</button>
  40. <button class="button">Prekes</button>
  41. <button class="button">Kontaktai</button>
  42. <input type="submit" class="button" value="Pristatymas">
  43.  
  44. <div>
  45.  
  46. </div>
  47.  
  48.  
  49. <div class="body"></div>
  50. <div class="grad"></div>
  51. <div class="header">
  52.  
  53. </div>
  54. <br>
  55. <div class="login">
  56. <form action="" method="POST">
  57. <input type="text" placeholder="Prisijungimas" name="userid"><br>
  58. <input type="password" placeholder="Slaptazodis" name="pswrd"><br>
  59. <input type="submit" onclick="check(this.form)" value="Login"/>
  60. </form>
  61. </div>
  62.  
  63.  
  64.  
  65.  
  66. </body>
  67.  
  68. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement