textbox Posted May 16, 2007 Share Posted May 16, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/ Share on other sites More sharing options...
textbox Posted May 16, 2007 Author Share Posted May 16, 2007 Oh, and i forgot to mention that the friends system will be implemented as well! So the same concept for that side of things! Quote Link to comment https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/#findComment-254835 Share on other sites More sharing options...
textbox Posted May 16, 2007 Author Share Posted May 16, 2007 Can mod rewrite be used here? Quote Link to comment https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/#findComment-254857 Share on other sites More sharing options...
trq Posted May 16, 2007 Share Posted May 16, 2007 Well, seeing as you've used SELECT * one would assume the user id is in your result. Just make a link and pass the id in the url. Can mod rewrite be used here? If you like. Quote Link to comment https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/#findComment-254896 Share on other sites More sharing options...
textbox Posted May 17, 2007 Author Share Posted May 17, 2007 Thanks Thorpe. Is there any other way to do this? Also, how do i alter my query so it includes the userid? Quote Link to comment https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/#findComment-255526 Share on other sites More sharing options...
MadTechie Posted May 17, 2007 Share Posted May 17, 2007 as a guess echo $image['id'] Quote Link to comment https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/#findComment-255531 Share on other sites More sharing options...
textbox Posted May 17, 2007 Author Share Posted May 17, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/#findComment-255538 Share on other sites More sharing options...
textbox Posted May 17, 2007 Author Share Posted May 17, 2007 Is mod rewrite a php function as well, or just apache? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/51735-displaying-user-profiles/#findComment-255592 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.