Guest User

Untitled

a guest
Jun 16th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php require("config.php"); ?>
  2. <?php include("includes/header.php"); ?>
  3. <font color="white">
  4. <?php
  5.  
  6. $username = $_POST['username'];
  7. $password = $_POST['password'];
  8.  
  9. if($username&&$password)
  10. {
  11.  
  12. $query = mysql_query("SELECT * FROM pcp WHERE username='$username'");
  13.  
  14. $numrows = mysql_num_rows($query);
  15. if ($numrows!=0) {
  16.  
  17. while ($row = mysql_fetch_assoc($query))
  18. {
  19. $dbusername = $row['username'];
  20. $dbpassword = $row['password'];
  21. }
  22. if ($username==$dbusername&&$password==$dbpassword)
  23. {
  24. echo ("Welcome " . $username);
  25. echo ("Here you can edit your profile");
  26. }
  27. else
  28. die("Incorrect Password");
  29.  
  30. }
  31.  
  32. }
  33. else
  34. die("Enter Username and Password");
  35.  
  36. ?>
  37. </font>
  38.  
  39. <?php include("includes/footer.php"); ?>
Add Comment
Please, Sign In to add comment