you would first need to have a session setup with either cookies or a browser end session il show u with cookies
saying that you have the following cookies
user_id
[php]
<?
session_start();
include(class.php);
include(config.php);
$user_id = $_COOKIE;
###DETERMAIN IF USER IS LOGGED IN
$checkuser = $db->query("select user_id from ".$db_prefix."_users where user_id='$user_id'");
$count = $db->count($checkuser);
if($count == 1)
{
Your content for profile update!
}
else
{
Error Message
}
##SAVE USER INFO
if(!$_POST
{
echo "What are you doing?"
}
else
{
$update = $db->query("update ".$db_prefix."_users set username='$username'");
}
?>
[/php]
thats pretty much how it goes i used a mysql class and a wut not but its really simple
Comments
Firstly it would check if the user is logged in and if yes it would show the appropiate form fields
When submitted the form would update the database with the new information
The Royal Ram
saying that you have the following cookies
user_id
[php]
<?
session_start();
include(class.php);
include(config.php);
$user_id = $_COOKIE;
###DETERMAIN IF USER IS LOGGED IN
$checkuser = $db->query("select user_id from ".$db_prefix."_users where user_id='$user_id'");
$count = $db->count($checkuser);
if($count == 1)
{
Your content for profile update!
}
else
{
Error Message
}
##SAVE USER INFO
if(!$_POST
{
echo "What are you doing?"
}
else
{
$update = $db->query("update ".$db_prefix."_users set username='$username'");
}
?>
[/php]
thats pretty much how it goes i used a mysql class and a wut not but its really simple