|
Posted by Pedro Graca on 10/30/06 20:17
VitaminB wrote:
> I try to insert data from a form into a mysql database, but it did not
> work...
>
>
> There is no error,
I think you mean: "I didn't print the error," :)
> but the data did not pass thru the table.
<snip>
> $result = mysql_query("INSERT INTO wholocations(íd', 'lat',
> 'lon','description', ówner', çity', 'street', 'zip', çountry')
> VALUES('0',
> '".$Lat."','".$Lon."','".$Name."' , '".$Owner."' ,'".$City."'
> ,'".$Street."' ,'".$ZIP."' ,'".$Country."')");
If there is an error in your SQL statement, $result will be false and
> echo $result;
this echo will be the same as <?php echo false; ?>
You need to test the return value of mysql_query()
if ($result === false) {
echo 'There was an error in the SQL statement. ';
echo 'The error was: ', mysql_error(), "].<br>\n";
}
> mysql_error();
<snip>
--
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]
|