Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error: parse error, unexpected T_VARIABLE


211655

Recommended Posts

hi i am writing this code:

$orders_query5 = tep_db_query("insert into custom_o
(c_id, c_product_name, c_product_model, c_product_price, c_shipping_price, c_product_quantity, c_shipping_type) 
values (\"$c_id2\", \"$itemname\",\"$itemmodel\", \"$itemprice\", \"$shippingcharge\", \"$quantity\", \"$ship_type\")
");

 

i get this erro

 

Parse error: parse error, unexpected T_VARIABLE in

 

i get this for the line where above code is.

 

when i take the line out rest of the code works.

Link to comment
Share on other sites

Because thier is a variable in that code thats not listed in the data base that it's trying to call. If thier is a SQL with the contribution you need to run it or insert it in the proper place of your data base.

 

Also this code looks like its open also.

 

$orders_query5 = tep_db_query("insert into custom_o

Link to comment
Share on other sites

No, the error is in PHP, not MySQL.

 

 

Exactly, like I said thier is a extra variable in the PHP code that is trying to call a variable in the Database that doesn't exist. The first part of that code starts with tep_db_query which is a call to the DB. Doesn't mean it is a problem with the DB, just means that the code has a extra varible that doesn't exist in the DB.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...