• We just launched and are currently in beta. Join us as we build and grow the community.

Profile Information Page in PHP/MySQL

keyhan

Distributed System Orchestrator
K Rep
0
0
0
Rep
0
K Vouches
0
0
0
Vouches
0
Posts
54
Likes
22
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 200 XP
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. <div id="right-nav">
  12. <h1>Personal Info</h1>
  13. <hr />
  14. <br />
  15. <?php
  16. include

    (

    'includes/database.php'

    )

    ;
  17. $result

    =

    mysql_query

    (

    "SELECT * FROM user where user_id='$id

    ' "

    )

    ;
  18. while

    (

    $test

    =

    mysql_fetch_array

    (

    $result

    )

    )
  19. {
  20. $id

    =

    $test

    [

    'user_id'

    ]

    ;
  21. echo

    " <div class='info-user'>"

    ;
  22. echo

    " <div>"

    ;
  23. echo

    " <label>Firstname</label>&nbsp;&nbsp;&nbsp;<b>"

    .

    $test

    [

    'firstname'

    ]

    .

    "</b>"

    ;
  24. echo

    "</div> "

    ;
  25. echo

    "<hr /> "

    ;
  26. echo

    "<br /> "

    ;
  27. echo

    " <div>"

    ;
  28. echo

    " <label>Lastname</label>&nbsp;&nbsp;&nbsp;&nbsp;<b>"

    .

    $test

    [

    'lastname'

    ]

    .

    "</b>"

    ;
  29. echo

    "</div> "

    ;
  30. echo

    "<hr /> "

    ;
  31. echo

    "<br /> "

    ;
  32. echo

    " <div>"

    ;
  33. echo

    " <label>Username</label>&nbsp;&nbsp;&nbsp;<b>"

    .

    $test

    [

    'username'

    ]

    .

    "</b>"

    ;
  34. echo

    "</div> "

    ;
  35. echo

    "<hr /> "

    ;
  36. echo

    "<br /> "

    ;
  37. echo

    " <div>"

    ;
  38. echo

    " <label>Birthday</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>"

    .

    $test

    [

    'birthday'

    ]

    .

    "</b>"

    ;
  39. echo

    "</div> "

    ;
  40. echo

    "<hr /> "

    ;
  41. echo

    "<br /> "

    ;
  42. echo

    " <div>"

    ;
  43. echo

    " <label>Gender</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>"

    .

    $test

    [

    'gender'

    ]

    .

    "</b>"

    ;
  44. echo

    "</div> "

    ;
  45. echo

    "<hr /> "

    ;
  46. echo

    "<br /> "

    ;
  47. echo

    " <div>"

    ;
  48. echo

    " <label>Number</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>"

    .

    $test

    [

    'number'

    ]

    .

    "</b>"

    ;
  49. echo

    "</div> "

    ;
  50. echo

    "<hr /> "

    ;
  51. echo

    "<br /> "

    ;
  52. echo

    "</div> "

    ;
  53. echo

    "<br /> "

    ;
  54. echo

    " <div class='edit-info'>"

    ;
  55. echo

    " <a href ='edit_profile.php?user_id=$id

    '><button>Edit Profile</button></a>"

    ;
  56. echo

    "</div> "

    ;
  57. echo

    "<br /> "

    ;
  58. echo

    "<br /> "

    ;
  59. }
  60. ?>
  61. </div>
  62. </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.


Download
You must upgrade your account or reply in the thread to view hidden text.
 

452,292

323,341

323,350

Top