Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Insert into database


benmal

Recommended Posts

I' m trying to insert the contents of a form into a customer table is this correct cause it does not seem to work (i think it something at the end with the; is there anything else which is wrong?

 

tep_db_query("insert into " . TABLE_CUSTOMERS . " values (NULL, " .

"\"" . $formVars["surname"] . "\", " .

"\"" . $formVars["firstName"] . "\", " .

"\"" . $formVars["initial"] . "\", " .

"\"" . $formVars["title"] . "\", " .

"\"" . $formVars["address1"] . "\", " .

"\"" . $formVars["address2"] . "\", " .

"\"" . $formVars["address3"] . "\", " .

"\"" . $formVars["city"] . "\", " .

"\"" . $formVars["county"] . "\", " .

"\"" . $formVars["postcode"] . "\", " .

"\"" . $formVars["country"] . "\", " .

"\"" . $formVars["phone"] . "\", " .

"\"" . $formVars["email"] . "\", " .

$dob . ", " . ")";

 

Thanks for your help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...