Re: insert data -
- From: Pedro Graca <hexkid@xxxxxxxxxxx>
- Date: 30 Oct 2006 20:17:09 GMT
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*.
.
- References:
- insert data -
- From: VitaminB
- insert data -
- Prev by Date: Re: passing information
- Next by Date: Re: insert data -
- Previous by thread: Re: insert data -
- Next by thread: Re: insert data -
- Index(es):
Relevant Pages
|