Jump to content

[SOLVED] PHP Insert Record Problem


kyleldi

Recommended Posts

For some reason my process file for my form will no longer insert data into the db, even though it connects properly.  Any ideas?  Here's my code:

 

$link = mysql_connect($db_host,$db_user,$db_pass);
if(!$link) die ('Could not connect to database: '.mysql_error());
mysql_select_db($db_name,$link);
$query = "INSERT into `".$db_table."` (date,company,name,email,instructions,material,tolerances_holes,tolerances_hole_hole,tolerances_profile,quantity,rfq_due_date,file01,file02,file03,file04,file05,originating_ip) values ('".$date."','".$company."','".$name."','".$email."','".$instructions."','".$material."','".$tolerances_holes."','".$tolerances_hole_hole."','".$tolerances_profile."','".$quantity."','".$rfq_due_date."','".$where_form_is."$dirname/".$image_list[14]."','".$where_form_is."$dirname/".$image_list[15]."','".$where_form_is."$dirname/".$image_list[16]."','".$where_form_is."$dirname/".$image_list[17]."','".$where_form_is."$dirname/".$image_list[18]."','".$originating_ip."')";
mysql_query($query);
mysql_close($link);

 

Thank You!

Link to comment
https://forums.phpfreaks.com/topic/148994-solved-php-insert-record-problem/
Share on other sites

SQL WAS INSERT into `quotes` (date,company,name,email,instructions,material,tolerances_holes,tolerances_hole_hole,tolerances_profile,quantity,rfq_due_date,file01,file02,file03,file04,file05,originating_ip) values ('March 11, 2009','LDI','Kyle','[email protected]','test test test','','0.005\" - 0.010\"','< 0.005\"','< 0.005\"','102','now','http://Kyle/Google Maps API TLC.pdf','http://kyle/Google Maps API - API Key S...pdf','http://Kyle/gallery-update.xls','http://Kyle/fpdf16.zip','http://Kyle/form.zip','72.35.35.2')

Error Was:Unknown column 'name' in 'field list'

 

I just filled the form in with a bunch of garbage to get an output

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.