Page 1 of 1

Ok. Now i am getting seriously stressed !!!

Posted: Thu Jul 07, 2005 2:26 pm
by ericburnard
HELP PLEASE !!!! i am going crazy over this.

All i want to do is show users details from my database on my page after they have logged in. people have given me links or snippets of code that go in one side of my head and out of the other.

please if anybody could give me a scipt that dosnt need much editing i would be ever so greatfull.

thanks

eric

Posted: Thu Jul 07, 2005 3:38 pm
by Burrito
you want someone to do it for you, or you want help doing it?

I'm happy to offer the latter:

use a url var to determine the id of the user about whom you want the information:

Code: Select all

<a href=&quote;http://www.yoursite.com/yourpage.php?userid=55&quote;>check user 55's stuff</a>
then query the db for that user's info and loop over all of the fields in the table:

Code: Select all

$result = mysql_query(&quote;select * from user where id = &quote;.$_GETї'userid'])
   or die(mysql_error());
while($row =  mysql_fetch_assoc($result)){
  echo $rowї'col1'].&quote;<br>&quote;.$rowї'col2'].&quote;<br>&quote;.$rowї'col3']; // etc
}

Posted: Thu Jul 07, 2005 3:40 pm
by John Cartwright
DO NOT CROSS POST.
Original Thread: viewtopic.php?p=184053&highlight=#184053
Topic Locked.