This is the error I am getting:
Error in query: INSERT INTO r_user ( jcode, fname, lname, dob, nickname, email, url) VALUES ( 'GPASSTAD', 'jonathan', 'smith', '1980-09-20', 'daiku, 'test@test.com', 'http://www.test.com'). 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 'test@test.com',
Here is the coding i am using
### Format date of birth as DATE value ###
$dob = sprintf ("%04d-%02d-%02d", $yyyy, $mm, $dd);
### No errors ###
if (sizeof($errorList) == 0)
{
### Insert personal information ###
$query = "INSERT INTO r_user (
jcode,
fname,
lname,
dob,
nickname,
email,
url)
VALUES (
'$jcode',
'$fname',
'$lname',
'$dob',
'$nickname,
'$email',
'$url')";
$result = mysql_db_query($database, $query, $connection) or die ("Error in query: $query. " . mysql_error());
### Mailing employer and sending notice to GPADMINISTRATION###
### Get resume id, for use in subsequest operations ###
$rid = mysql_insert_id($connection);
### Insert educational qualifications ###
for($x=0; $x<sizeof($institute); $x++)
{
if (!empty($institute[$x]) && !empty($degree_year[$x]))
{
$query = "INSERT INTO r_education (
rid,
institute,
fk_degree,
fk_subject,
year)
VALUES (
'$rid',
'$institute[$x]',
'$degree[$x]',
'$subject[$x]',
'$degree_year[$x]')";
$result = mysql_db_query($database, $query, $connection) or die ("Error in query: $query. " . mysql_error());
}
}
### Insert military profile ###
for($x=0; $x<sizeof($military); $x++){
if (!empty($branch[$x]) && !empty($rank[$x])){
$query = "INSERT INTO r_military (
rid,
branch,
rank,
mos,
years)
VALUES ('$rid',
'$branch[$x]',
'$rank[$x]',
'$mos',
'$years')";
$result = mysql_db_query($database, $query, $connection) or die ("Error in query: $query. " . mysql_error());
}
}
### Insert skill profile ###
for($x=0; $x<sizeof($skill); $x++){
if (!empty($skill[$x]) && !empty($experience[$x])){
$query = "INSERT INTO r_skill (
rid,
skill,
experience)
VALUES ('$rid',
'$skill[$x]',
'$experience[$x]')";
$result = mysql_db_query($database, $query, $connection) or die ("Error in query: $query. " . mysql_error());
}
}
### Insert references ###
for($x=0; $x<sizeof($employer); $x++){
if (!empty($ref_name[$x]) && !empty($ref_phone[$x])){
$query = "INSERT INTO r_reference (
rid,
name,
phone,
email)
VALUES ('$rid',
'$ref_name[$x]',
'$ref_phone[$x]',
'$ref_email[$x]')";
$result = mysql_db_query($database, $query, $connection) or die ("Error in query: $query. " . mysql_error());
}
}
### Print success code ###
echo "Your application has been accepted.<p><a href=?cmd=List>Return to job listings</a>";
}
else
{
### Or list errors ###
listErrors();
}
}
}
any help would be greatly appreciated