Jump to content

syntax error


mr.eVL

Recommended Posts

Error in query: . 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 '' at line 1

Can someone explain to me what this error means? ???

 

 

LIKEWISE, IM FACING THIS ERROR TOO. I CANT UPDATE THE EDITED DATA.

 

Parse error: parse error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\FYP\save_company_contacts.php on line 43

 

 

$query = "INSERT into company_contacts (company_name, company_contact, company_fax, company_email, company_address, company_description, contactor_name, contactor_num) VALUE ('$company_name', '$company_contact', '$company_fax', '$company_email', '$company_address', '$company_description', '$contactor_name', '$contactor_num')";

 

$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());

$submitted = true;

 

if($submitted)

{

$query = "UPDATE company_contacts set company_name='$company_name', company_contact='$company_contact', company_fax='$company_fax', company_email='$company_email', company_address='$company_address', company_description='$company_description', contactor_name='$contactor_name', contactor_num='$contactor_num' where id="$_GET['id'];

 

print "You will be re-directing soon!";

}

 

hope to hear from anyone soon. please!

Link to comment
https://forums.phpfreaks.com/topic/112337-syntax-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.