Guest User

Untitled

a guest
Oct 30th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?php require("../pages/header.php");
  2. require("../functions/db_connect.php");
  3. //////////////////
  4. // PROFILE PAGE //
  5. //////////////////
  6.  
  7. //user profile content placed below ?>
  8.  
  9.  
  10. <?php if (isset($_SESSION['username'])) { ?>
  11.  
  12. <aside id="profilenav">
  13. <ul>
  14. <li><a href="<?php echo $url . 'profile';?>">View my profile</a></li>
  15. <li><a href="<?php echo $url . 'team';?>">Create a team</a></li>
  16. </ul>
  17. </aside>
  18. <section id="content">
  19.  
  20. <?php
  21.  
  22. $query="SELECT * FROM players username, password, email, birth, elo, exposer, newsletter WHERE id='$username'";
  23. $result=mysql_query($query);
  24.  
  25. mysql_close();
  26.  
  27. $username=$_SESSION['username'];
  28. $password=$_SESSION['password'];
  29. $email=$_SESSION['email'];
  30. $birth=$_SESSION['birth'];
  31. $elo=$_SESSION['elo'];
  32. $exposer=$_SESSION['exposer'];
  33. $newsletter=$_SESSION['newsletter'];
  34.  
  35. echo "<b>$username<br>$password<br>$email<br>$birth<br>$elo<br>$exposer<br>$newsletter";
  36.  
  37. ?>
  38.  
  39.  
  40.  
  41.  
  42.  
  43. </section>
  44. <?php }else { ?>
  45. <section id="content">
  46. <h1>You must sign in to see this information</h1>
  47. </section>
  48.  
  49. <?php }?>
  50.  
  51.  
  52. <?php require("../pages/footer.php"); ?>
Add Comment
Please, Sign In to add comment