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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.