SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <select class="un">
  2.         <option class="op" value="" disabled selected style="color:gray">Username</option>
  3.         <?php foreach ($result as $output) { ?>
  4.     <option class="op"> <?php echo $output["firstname"]." ". $output["lastname"]; ?></option>
  5. <?php } ?>  
  6.             </select>
  7.       <input class="pass" type="password"  placeholder="Password">
  8.       <a class="submit" align="center">Sign in</a> <select class="un">
  9.             <option class="op" value="" disabled selected style="color:gray">Username</option>
  10.             <?php foreach ($result as $output) { ?>
  11.         <option class="op"> <?php echo $output["firstname"]." ". $output["lastname"]; ?></option>
  12.     <?php } ?>  
  13.                 </select>
  14.           <input class="pass" type="password"  placeholder="Password">
  15.           <a class="submit" align="center">Sign in</a>
  16.  
  17. <!-- begin snippet: js hide: false console: true babel: false -->
  18.      
  19. $message="";
  20. if(count($_POST)>0) {
  21.     //$conn = mysqli_connect("localhost","root","","phppot_examples");
  22.     $result = sql($db, "SELECT * FROM user_details WHERE firstname='" . $_POST["firstname"] . "' and password = '". $_POST["pdw"]."'");
  23.     //$result = mysqli_query($conn,"SELECT * FROM users WHERE user_name='" . $_POST["userName"] . "' and password = '". $_POST["password"]."'");
  24.     $count  = rowCount($result);
  25.     if($count==0) {
  26.         $message = "Invalid Username or Password!";
  27.     } else {
  28.         $message = "You are successfully authenticated!";
  29.     }
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top