Jump to content

Displaying user profiles


textbox

Recommended Posts

Hello, I am nearly complete on the task of creating a community site.

 

One last thing to do it allow users to view other users profiles.

 

I am pumping out the first three users images as "new members" using this code;

 

	$getimages = mysql_query("SELECT * FROM `images` WHERE 
							`timeposted` ORDER BY `timeposted` ASC LIMIT 3");

while 
($image=mysql_fetch_array
	($getimages)
)
{

echo "<img src=\"$image[thumblocation]\">";echo $spacer;

}

 

How do i attach the userid to this, and what is the best way of linking to a profile?

Passing the query in the URL?

Setting up a static page for each user just like myspace? If so, how is that done?

 

Any suggestions would be great.

 

Thanks

Nick

Link to comment
https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/
Share on other sites

as a guess

 

echo $image['id']

 

Sorry, i didnt form that question very good.

 

What i want to know is what everyone else would do.

 

My site is a community site, friends, comments, messages, all the usual stuff.

 

Users have profiles that display their top friends just like myspace does.

 

How do i pull out a row of images and names and link the individual names and images to their profiles?

 

My query i posted just pulls out the top 3 profiles, kind of cheating!

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.