Forum Moderators: coopster
I can't for the life of me work out why I keep getting this error:
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username='billybob')' at line 76
[php]
$query = "INSERT INTO matrimonial (
username,
phone,
mobile,
createdby,
maritalstatus,
havechildren,
starsign,
height,
bodytype,
complexion,
specialcases,
bloodgroup,
religion,
tongue,
caste,
subcaste,
gotra,
manglik,
familyvalues,
educationlevel,
educationarea,
occupation,
annualincome,
diet,
smoke,
drink,
convenienttime,
contact_details_dislay_status,
family_father,
family_mother,
family_brother,
family_sister,
personality,
background,
date_reg,
profile_complete) VALUES (
'$_SESSION[username]',
'$phone',
'$mobile',
'$createdby',
'$maritalstatus',
'$havechildren',
'$starsign',
'$height',
'$bodytype',
'$complexion',
'$specialcases',
'$bloodgroup',
'$religion',
'$tongue',
'$caste',
'$subcaste',
'$gotra',
'$manglik',
'$familyvalues',
'$educationlevel',
'$educationarea',
'$occupation',
'$annualincome',
'$diet',
'$smoke',
'$drink',
'$convenienttime',
'$contact_details_dislay_status',
'$family_father',
'$family_mother',
'$family_brother',
'$family_sister',
'$personality',
'$background',
'$currentdatetime',
'1'
WHERE username='$_SESSION[username]')";
# execute SQL statement
$result = @mysql_query ($query);
# check for error
if (!$result) { echo("ERROR: " . mysql_error() . "\n$query\n");
// Show errors, if any
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
}
[/php]
Can anyone possibly help?
[/php]