|
Posted by Pedro Graca on 11/24/06 16:17
so many sites so little time wrote:
<snip>
> if (isset ($_POST['submit'])) { // Handle the form.
>
> // Define the query.
> $query = "UPDATE home SET header='{$_POST['header']}',
> body='{$_POST['body']}' WHERE home_id={$_POST['id']}";
> $r = mysql_query ($query); // Execute the query.
<snip>
> could you please help, thanks, and have a happy thanksgiving
Check the return value of mysql_* calls.
Where I snipped add
if (!$r) {
// There was an error
// for simplicity sake, I'll just print it and exit
exit('Error in query (' . $query . '): ' . mysql_error());
}
Add similar code after *all* relevant mysql_* calls.
When you run the script and there is an error, the script itself will
tell you why it failed. After that you just need to (understand the
reason for failure and) correct the error and try again.
--
I (almost) never check the dodgeit address.
If you *really* need to mail me, use the address in the Reply-To
header with a message in *plain* *text* *without* *attachments*.
Navigation:
[Reply to this message]
|