Advertisement
Guest User

Untitled

a guest
Sep 4th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         <?php
  2. error_reporting(E_ALL & ~E_NOTICE);
  3. session_start();
  4.  
  5. if($_POST['submit'])
  6. {
  7.     include_once("connection.php");
  8.     $username = strip_tags($_POST['username']);
  9.     $pass = strip_tags($_POST['pass']);
  10.     $sql = "SELECT * FROM 'users' WHERE 'username' = '$username', 'pass' = '
  11. $pass'";
  12.     $query = mysql_query($dbCon, $sql);
  13.    
  14.     if(mysql_num_rows($query)){
  15.         //מה אם הנתונים נכונים
  16.     }else{
  17.         // מה אם הנתונים לא נכונים
  18.     }
  19. }
  20. ?>
  21. <!DOCTYPE html>
  22. <html>
  23.     <head>
  24.         <meta charset="utf-8" />
  25.         <link rel="stylesheet" type="text/css" href="style.css">
  26.         <title>MyStory - התחברות</title>
  27.     </head>
  28.     <body>
  29.         <header>
  30.             <a id="logo" href="MyStory.html">Name</a>
  31.         </header>
  32.        
  33.         <div class = "lform">
  34.        
  35.             <form method="post" action="login.php">
  36.            
  37.             <input class="input" type="text" placeholder="שם משתמש" name="username" /><br/>
  38.             <input class="input" type="password" placeholder="סיסמה" name="pass" /><br/>
  39.             <input class="input" id="loginBtn" type="submit" value="התחבר" />
  40.            
  41.             </form>
  42.            
  43.         </div>
  44.        
  45.     <footer>©2016</footer>
  46.     </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement