Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2.  
  3. include "functions.php";
  4.  
  5. $a = checkLogin();
  6.  
  7. if($a==1) {
  8. $id = $_COOKIE['id'];
  9.  
  10. include "databaseConnector.php";
  11.  
  12. $query = $mysqli->query("SELECT * FROM users WHERE id = '$id'") or die($mysqli->error.__LINE__);
  13.  
  14. if($query->num_rows > 0) {
  15. while($row = $query->fetch_assoc()) {
  16. ?>
  17. <?php echo stripslashes($row['firstname'])." ".stripslashes($row['lastname']); ?>
  18. <?php
  19. }
  20. }
  21. else {
  22. return false;
  23. }
  24. }
  25. else {
  26. redirectIndex();
  27. }
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement