Profile Information Page in PHP/MySQL

In this tutorial, we are going to create my new tutorial and it's called "Profile Information Page in PHP/MySQL". For this tutorial, you can merge the previous tutorial on How To Create Registration Page In PHP/MySQL and How To Create Login Page In PHP/MySQL. Let's start with, kindly follow the steps below.

Creating Registration Page

Kindly follow the procedure in this tutorial on How To Create Registration Page In PHP/MySQL.

Creating Login Page

Then, we are going to create the login page on How To Create Login Page In PHP/MySQL.

Creating Profile Information Page

After the steps above, this source code below will show the profile information of one member after the registration and login process. Kindly open your HTML Editor and kindly copy and paste after your BODY tag of your page.
  1. <div id="container">
  2. <div id="left-nav">
  3. <div class="clip1">
  4. <a href="updatephoto.php" title="Change Profile Picture"><img src="<?php echo $row['profile_picture'] ?>"><button>Update Picture</button></a>
  5. </div>
  6. <div class="user-details">
  7. <h3><?php echo $firstname ?>&nbsp;<?php echo $lastname ?></h3>
  8. <h2><?php echo $username ?></h2>
  9. </div>
  10. </div>
  11.  
  12. <div id="right-nav">
  13. <h1>Personal Info</h1>
  14. <hr />
  15. <br />
  16. <?php
  17. include('includes/database.php');
  18. $result=mysql_query("SELECT * FROM user where user_id='$id' ");
  19. while($test = mysql_fetch_array($result))
  20. {
  21. $id = $test['user_id'];
  22. echo " <div class='info-user'>";
  23. echo " <div>";
  24. echo " <label>Firstname</label>&nbsp;&nbsp;&nbsp;<b>".$test['firstname']."</b>";
  25. echo "</div> ";
  26. echo "<hr /> ";
  27. echo "<br /> ";
  28. echo " <div>";
  29. echo " <label>Lastname</label>&nbsp;&nbsp;&nbsp;&nbsp;<b>".$test['lastname']."</b>";
  30. echo "</div> ";
  31. echo "<hr /> ";
  32. echo "<br /> ";
  33. echo " <div>";
  34. echo " <label>Username</label>&nbsp;&nbsp;&nbsp;<b>".$test['username']."</b>";
  35. echo "</div> ";
  36. echo "<hr /> ";
  37. echo "<br /> ";
  38. echo " <div>";
  39. echo " <label>Birthday</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>".$test['birthday']."</b>";
  40. echo "</div> ";
  41. echo "<hr /> ";
  42. echo "<br /> ";
  43. echo " <div>";
  44. echo " <label>Gender</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>".$test['gender']."</b>";
  45. echo "</div> ";
  46. echo "<hr /> ";
  47. echo "<br /> ";
  48. echo " <div>";
  49. echo " <label>Number</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>".$test['number']."</b>";
  50. echo "</div> ";
  51. echo "<hr /> ";
  52. echo "<br /> ";
  53. echo "</div> ";
  54. echo "<br /> ";
  55. echo " <div class='edit-info'>";
  56. echo " <a href ='edit_profile.php?user_id=$id'><button>Edit Profile</button></a>";
  57. echo "</div> ";
  58. echo "<br /> ";
  59. echo "<br /> ";
  60. }
  61. ?>
  62. </div>
  63. </div>
And, that's it. This is the steps on how to create a simple Profile Information Page with Registration Page and Login Page see you in my next tutorial. Share us your thoughts and comments below. Thank you so much for dropping by and reading this tutorial post. For more updates, don’t hesitate and feel free to visit this website more often and please share this with your friends or email me at [email protected]. Practice Coding. Thank you very much.

Add new comment