Ben's Blog

Saturday, March 01, 2008

Assignment 002: "profile.php"

Now, with this been a social network I had to think about how to create individual profile pages. After looking at todays social sites I found that they each had there own unique way of showing user profiles.

Facebook seems to use the Member ID to create individual profile pages.



Myspace seems to use a unique URL defined by the user for the profile page.



With this in mind, and after speaking to Dave about how simple it was to create the Facebook style page I have opted to query the member ID. In order to create the profile page I have to enter the code on the pages that link to the profile page. As I queried the member ID to get the member name to show the member profile I reversed the code to retrieve the member ID and created the profile page by entering the query into the profile URL. Below is the code for the link to the user profile.

'http://servernamehere/iplanet/profile.php?member_id="{$row['member_id']}'

The above code then comes into play when loading up the information to show the individual profiles. By using the GET code I retrieve the member id from the URL and again, by using MySQL, query the database to load and show all information with the member id from the URL.

Simple, now that I've done it!

Labels:

0 Comments:

Post a Comment

<< Home