Jump to content

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','kyle@mac.com','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

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.