I have changed the coding slightly so that the ID comes from this script and not the previous form. The username and password are obtained through the include script, which is also used to start the sessions.
<?
include "include.php";
include "config.php";
$connection = mysql_connect(localhost,$user_username,$user_password)
or die("Database Connection Failed. Please inform our administritive team.");
$result=mysql_select_db($user_database) or die( "Unable to select database");
//get the contents from the hidden field
global $content;
$profile = $_POST["content"];
$query = "SELECT ID FROM user_information WHERE username = \"$username\" AND password = \"$password\"";
$result = mysql_query($query) or die("No.");
$query = "UPDATE user_information SET profile=\"". $profile ."\" where ID=\"".$ID."\"";
$result = mysql_query($query);
if (!$query)
{
die(" Query could not be executed");
}
mysql_close();
PRINT "$profile";
?>