Hi. I am having som trubble. I want to update my database and i have the following code:
....
if ($submit)
submit($title,$message,$author);
function submit($title,$message,$author)
{ $date = gmdate("d.m.Y");
$result = mysql_query("UPDATE sistenytt SET title = '$title', message = '$message', date = '$date', author = '$author' WHERE id = '$id'");
if (!$result)
echo "Error: The news was not updated";
else
{
include 'index.php';
}
$submit = false;
}
When i run the script i do not get up the error message, and the include index.php is launched, which should mean nothing went wrong with the query. But still the news is not updated when i check the database afterwords... What could be happening? I have testet the variables and its nothing wrong with them.
Any help would be appricieted!
Thanx