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
Ok. Now i am getting seriously stressed !!!
Moderator: General Moderators
- ericburnard
- Forum Contributor
- Posts: 104
- Joined: Wed Jun 15, 2005 5:11 pm
- Location: Chesterfield, UK
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:
then query the db for that user's info and loop over all of the fields in the table:
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="e;http://www.yoursite.com/yourpage.php?userid=55"e;>check user 55's stuff</a>Code: Select all
$result = mysql_query("e;select * from user where id = "e;.$_GETї'userid'])
or die(mysql_error());
while($row = mysql_fetch_assoc($result)){
echo $rowї'col1']."e;<br>"e;.$rowї'col2']."e;<br>"e;.$rowї'col3']; // etc
}- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: