Advertisement
Guest User

Untitled

a guest
Apr 4th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <?php
  2. include "concept/assets/libs/php/conn.php";
  3. if($_SERVER["REQUEST_METHOD"] == "POST") {
  4. // username and password sent from form
  5. $myusername = $_POST['user'];
  6. $mypassword = $_POST['pass'];
  7. $sql = "SELECT * FROM users WHERE username = '$myusername'";
  8. $result = mysqli_query($conn,$sql);
  9. $count = mysqli_num_rows($result);
  10. if($count == 1) { // one row matched
  11. header("location: http://millar16.cucstudents.org/concept/"); }
  12. else {
  13. echo "Your Login Name or Password is invalid";
  14. } }?>
  15. <form action = "" method = "post">
  16. <input type = "text" name ="user" class ="box"
  17. placeholder="username" /><br /><br />
  18. <input type = "password" name ="pass" class ="box"
  19. placeholder="password" /><br/><br />
  20. <input type = "submit" value=" Submit "/><br /> </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement