I get following error for when i try to inset values
Column count doesn't match value count at row 1
here is my insert code
<?php
// include function files for this application
require_once("site_sc_fns.php");
session_start();
do_html_header("Adding a site");
if (isset ($HTTP_SESSION_VARS['valid_user'])) {
if (filled_out($HTTP_POST_VARS)) {
if( insert_site($ktsitename, $location, $address, $sitecontact, $sitecontactph, $oobno, $lanip, $routerlanip, $routerlbip, $routerisdnip, $routerhostname, $routerserialno, $frattcid, $frlecpttcid, $miscid, $misleccid, $attplcid, $attplleccid, $ktplleccid, $dlci, $atmattcid, $atmlecattcid, $sbccid, $updated, $notes))
echo "Site '$ktsitename' was added to the database.<br>";
else
echo "Site '$ktsitename' could not be added to the database.<br>";
} else
echo "You have not filled out the form. Please try again.";
do_html_url("admin.php", "Back to administration menu");
} else
echo "You are not authorised to view this page.";
do_html_footer();
?>
Insert function
function insert_site($ktsitename, $location, $address, $sitecontact, $sitecontactph, $oobno, $lanip, $routerlanip, $routerlbip, $routerisdnip, $routerhostname, $routerserialno, $frattcid, $frlecpttcid, $miscid, $misleccid, $attplcid, $attplleccid, $ktplleccid, $dlci, $atmattcid, $atmlecattcid, $sbccid, $updated, $notes)
// insert a new site into the database
{
$conn = db_connect();
// $query = "insert into noc values
$query = "insert into noc (ktsitename, location, address, sitecontact, sitecontactph, oobno, lanip, routerlanip, routerlbip, routerisdnip, routerhostname, routerserialno, frattcid, frlecpttcid, miscid, misleccid, attplcid, attplleccid, ktplleccid, dlci, atmattcid, atmlecattcid, sbccid, updated, notes) values
('$ktsitename', '$location', '$address', '$sitecontact', '$sitecontactph', '$oobno', '$lanip', '$routerlanip', '$routerlbip', '$routerisdnip', '$routerhostname', '$routerserialno', '$frattcid', '$frlecpttcid', '$miscid', '$misleccid', '$attplcid', '$attplleccid', '$ktplleccid', '$dlci', '$atmattcid', '$atmlecattcid', '$sbccid' '$updated', '$notes')";
$result = mysql_query($query) or die(mysql_error()) ;
if (!$result)
return false;
else
return true;
}