how can i update to database status = 1 where id =$id using an update statement after a login for example or a separate page please any one how the string would look like?
this is for a member status script im trying to make it so online members can have there own page
this is just the viewing part and the updating part next
mysql_select_db("messages") or die(mysql_error());
$data = mysql_query("SELECT on_status FROM users WHERE id='$user_id'")
or die(mysql_error());
echo "<table border cellpadding=3 bgcolor=\"00FF00\">";
while($info = mysql_fetch_array( $data ))
{
echo "<tr>";
echo "<th>User:</th> <td>".$info['user_name'] . "</td> ";
echo "<th>Status:</th> <td>".$info['on_status'] . " </td></tr>";
}
echo "</table>";
?>
<p><br>
<a href="/home.php">Go Back</a><p>