Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.