Issue with Inserting a record into a MySql database

obazard

New Member
I am having an issue with a simple form uploading script.On this upload script I built to upload data to a MySql database, I can't seem to get the record to insert into the database when I include this one variable.I figured that perhaps I am overlooking some minor coding issue, and I'm working on a deadline to get this system live...Here is the code snippit that is giving me issues. \[code\] $title=$_REQUEST['title'];$author=$_REQUEST['author'];$hours=$_REQUEST['hours'];$start_d=$_REQUEST['start_d'];$start_m=$_REQUEST['start_m'];$start_y=$_REQUEST['start_y'];$end_d=$_REQUEST['end_d'];$end_m=$_REQUEST['end_m'];$end_y=$_REQUEST['end_y'];$certificate=$_REQUEST['certificate'];$required=$_REQUEST['required'];$assessment=$_REQUEST['assessment'];$describe=$_REQUEST['description'];$query=mysql_query("INSERT INTO `records` (title, hours, start_date_d, start_date_m, start_date_y , end_date_d, end_date_m, end_date_y , certificate, requirement, author, approved, assessment, describe) VALUES ('$title', '$hours', '$start_d', '$start_m', '$start_y', '$end_d', '$end_m', '$end_y', '$certificate', '$required', '$author', '0', '$assessment', '$describe')");mysql_close();\[/code\]The variable that is giving me issues is the one denoted as '$describe'. My previous testing has indicated:
  • The form script is collecting data correctly
  • The form script is passing the data to the upload script correctly via method='post'
  • The database connection information is correct
  • All of the field names in the mysql query are typed correctly
Thank you in advance for your help.Update:echo mysql_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 ' assessment, describe) VALUES' at line 1
 
Back
Top