PHP member profile help

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
jyuuni
Forum Newbie
Posts: 3
Joined: Tue Nov 23, 2004 10:58 pm

PHP member profile help

Post by jyuuni »

I have a member management script on my site, but I was wondering how I can create a page for each of them as a profile? All of their information is stored in a table by mySQL, but I don't know how to show it in a page. Also, any ideas on how to let them edit their information? Thanks :wink:
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post by djot »

-
Hi,

I would try to read at least one single mysql tutorial.

djot
-
jyuuni
Forum Newbie
Posts: 3
Joined: Tue Nov 23, 2004 10:58 pm

Post by jyuuni »

I have tried to find a tutorial in what I am asking about, but I didn't see anything. I'm not really sure what to look for anyway since I'm new to it, but if you would maybe show me the mysql tutorial that I should read instead of just telling me I should, that would be helpful. Thanks
Archy
Forum Contributor
Posts: 129
Joined: Fri Jun 18, 2004 2:25 pm
Location: USA

Post by Archy »

Basically, you ned to get the unique ID number of the member, and then use a MySQL statement to find that user.

Code: Select all

$sql = "SELECT * FROM table WHERE id='$id'";
$rs = mysql_query($sql) or die(mysql_error());

$get = mysql_fetch_assoc($rs);
     $variable = $get['column_name_such_as_username'];
     $anotherVariable = $get['another_column_name'];

echo"Username: $variable
<br />
Something else: $anotherVariable";
You will need to do something like that.
jyuuni
Forum Newbie
Posts: 3
Joined: Tue Nov 23, 2004 10:58 pm

Post by jyuuni »

thanks alot, that's all I needed. Do I need to include a database connect file in there somewhere so it can connect?
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

yes, before the sql query
Post Reply