Page 1 of 1
PHP member profile help
Posted: Tue Nov 23, 2004 11:04 pm
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

Posted: Wed Nov 24, 2004 2:53 am
by djot
-
Hi,
I would try to read at least one single mysql tutorial.
djot
-
Posted: Wed Nov 24, 2004 10:41 am
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
Posted: Wed Nov 24, 2004 10:49 am
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.
Posted: Wed Nov 24, 2004 11:36 am
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?
Posted: Thu Nov 25, 2004 4:03 am
by phpScott
yes, before the sql query