I've a php script that creates (inserts) a new record in a MySQL table. It
executes, goes to the next page, but it doesn update the db>
The db name and table name are OK. I've printed the values passed to the
script and it's OK too.
What code can I add to the script to find out the error of the query?
Here's the script:
<?php
$connection=@mysql_connect("localhost","wagner","xyz") or die ("No
connection!");
$db=@mysql_select_db("sbwresearch_com",$connection) or die ("No database!");
$qry_1="insert into scr_149
(
username,
e_mail,
q01a,
...
q07a,
date_done
)
values
(
'$username',
'$e_mail',
'$q01a',
...
'$q07a',
'$date_done'
)"
or die ("No query #1!");
$result_1=@mysql_query($qry_1,$connection);
@mysql_close($connection);
header ("location:scr_6.htm");
flush();
exit;
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php