Jump to content

Recommended Posts

Hi I am trying to insert information into the database and I am receiving the following message:

 

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 'Manager,Fleet Manager,Events Director,hr,bm,appdate,ip) VALUES ('','','','','','' at line 1

 

$insert = mysql_query("INSERT INTO `pilots` (login,fname,lname,email,vatsimid,hub,hours,hoursc,password,rank,status,   Hub Manager,Fleet Manager,Events Director,hr,bm,appdate,ip) VALUES ('$login','$_POST[fname]','$_POST[lname]','$_POST','$_POST[vatsimid]','$_POST[hub]','$_POST[hours]','$_POST[hoursc]','$_POST[password]','First Officer','0','0','0','0','0','$now','$ip')") or die(mysql_error());

 

echo "<b><center>APPLICATION SENT TO DATABASE YOU WILL RECCEVIE AN EMAIL SHORTLY</b><</center>";}

 

That is just the insert portion of the code.

 

Thanks in advanced

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

That would result in a different error message.

 

The column names - Hub Manager,Fleet Manager, and Events Director contain spaces and require special handling. The recommend method would be for you to rename those to remove the space. I recommend changing the space to an underscore _.

Link to comment
https://forums.phpfreaks.com/topic/127069-mysql-error/#findComment-657310
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.