Re: stuck on stupid...can't find the bloody error...
| From: | Andy Ladouceur | Date: | Sun, 25 Apr 2004 11:22:53 +0000 |
| Subject: | Re: stuck on stupid...can't find the bloody error... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34081@lists.php.net to get a copy of this message | ||
Dan Bowkley wrote:
else { $query_insert = "INSERT INTO boards (wo_num, name, phone, email, date, board_type, last_three, weight_in, weight_out) VALUES (\'$wo_num\', \'$name\', \'$phone\', \'$email\', \'$date\', \'$board_type\', \'$last_three\', \'$weight_in\', \'$weight_out\')"; No need to escape the single quotes. Not entirely sure if it's invalid or not, but it's unneccessary.
$result_insert = @mysql_query ($query_insert); if ($result_insert == "") { echo "<input type=\"hidden\" name=\"action\" value=\"0\"\n"; echo "<INPUT type=\"submit\" value=\"Continue\">\n"; } else {echo "OOPS! Your programmer is an idiot!\n";}Try this: if (($result_insert=@mysql_query($query_insert)) != FALSE) { ... echo HTML ... } else {echo "Oops! Your programmer is broken. Oh and here's what MySQL said: <br />\n".mysql_error();} Hopefully that works for you. I think the problem may be the escapes quotes. Cheers, Andy