USER DISPLAY

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
corillo181
Forum Commoner
Posts: 76
Joined: Wed Apr 26, 2006 3:02 pm

USER DISPLAY

Post by corillo181 »

what i'm trying to do is..

i got in the database information about a few user from a form that they did..

now i want to make apage with those user like a list..

|user1|user2|


and so own...

but what i want to know..
how do i make just a page that when they click any user that users information shows?


and to that guy that gave me his vie won usin othe rppl things..
i already got all my picutre sshowing in one page like i wanted to.. and didn't need java.. so if you going to take your time and help..

please do it right.. thank you..
User avatar
Trenchant
Forum Contributor
Posts: 291
Joined: Mon Nov 29, 2004 6:04 pm
Location: Web Dummy IS

Post by Trenchant »

Assuming your using MySQL it would be something like this:

Code: Select all

$sql = mysql_query("SELECT * FROM `table`");
while($sel = mysql_fetch_array($sql)) {
  echo $sel[COLNAME]."<br>";
}
That would show all the usernames in the database.

For the other thing you need look up the above two functinos mysql_query and mysql_fetch_array. You will be able to figure it out. You basically just cut the while statement out and add some to the mysql_query line.

Hope it helps
corillo181
Forum Commoner
Posts: 76
Joined: Wed Apr 26, 2006 3:02 pm

Post by corillo181 »

i know how to deal with mysql ..

wha ti'm trying to do.. is make a page for when someone click on the name display the see the info aobut that person...

lets say if i got 1 user i can jus tmake a page with all the information aobut that person.. but if i got 100 is not gonna be so easy..

so what i got in mind is make apage with everything on it.. wich i know how to do, but i don't know how to make it so anothe ruser can see someones else information..


like i made a page for when any user log in they can see their information.. now i want to make a nothe rpage like that for when a user click anothe ruser name they can see that user information..
corillo181
Forum Commoner
Posts: 76
Joined: Wed Apr 26, 2006 3:02 pm

Post by corillo181 »

like you see this forum that you click on someones username and it takes you to their profile.. thats what i'm trying to do..
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

hint...

Code: Select all

$sql = 'SELECT * FROM `members` WHERE `id` = \''. intval($_GET['id']).'\' LIMIT 1';
corillo181
Forum Commoner
Posts: 76
Joined: Wed Apr 26, 2006 3:02 pm

Post by corillo181 »

mm.. you gave me an idea

like putting the name and when the user click on the name make it a get method on the other page and from the get method search the name that they click..

sounds like a plan.. out to try thanks :)
Post Reply