hi i am getting this error
i checked everything i am lost
You have an error in your SQL syntax near 'update) values ('tst 12', '1', '2', '3', '4', '5', '67', '8', '910', '1' at line 1
here is my insert function
function insert_site($application, $manager, $admin, $topaz, $nocdiag, $nocupdown, $hd, $sla, $afthr, $comment, $cla, $update)
// insert a new application into the database
{
$conn = db_connect();
// $query = "insert into apps values
$query = "insert into apps (application, manager, admin, topaz, nocdiag, nocupdown, hd, sla, afthr, comment, cla, update) values
('$application', '$manager', '$admin', '$topaz', '$nocdiag', '$nocupdown', '$hd', '$sla', '$afthr', '$comment', '$cla', '$update')";
$result = mysql_query($query) or die(mysql_error()) ;
if (!$result)
return false;
else
return true;
}
and insert scrpit
<?php
// include function files for this application
require_once("site_sc_fns.php");
session_start();
do_html_header("Adding a Application");
if (isset ($HTTP_SESSION_VARS['valid_user'])) {
if (filled_out($HTTP_POST_VARS)) {
if( insert_site($application, $manager, $admin, $topaz, $nocdiag, $nocupdown, $hd, $sla, $afthr, $comment, $cla, $update))
echo "Site '$application' was added to the database.<br>";
else
echo "Site '$application' could not be added to the database.<br>";
} else
echo "You have not filled out the form. Please try again.";
do_html_url("admin1.php", "Back to Main page");
} else
echo "You are not authorised to view this page.";
do_html_footer();
?>