Page 1 of 1

USER DISPLAY

Posted: Sat May 06, 2006 7:17 pm
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..

Posted: Sat May 06, 2006 8:25 pm
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

Posted: Sat May 06, 2006 8:40 pm
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..

Posted: Sat May 06, 2006 8:41 pm
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..

Posted: Sat May 06, 2006 9:12 pm
by John Cartwright
hint...

Code: Select all

$sql = 'SELECT * FROM `members` WHERE `id` = \''. intval($_GET['id']).'\' LIMIT 1';

Posted: Sat May 06, 2006 9:57 pm
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 :)