user2977587
user2977587

Reputation: 17

Using PHP to submit data to MYSQL Database

Hi I am developing a website that has users fill in a form and submit data to a database but I can't get any of it to submit. Please can someone help me find the problem. Thanks.

Here is the pages PHP/HTML.

http://pastebin.com/8jfWrByd

and here is the table's layout

http://pastebin.com/E06Ac8Yx

When I go to try and post an item I get the following 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 'Desc, Tips) VALUES ('Base Invaders', 'Ron', '27', '12500', '850', '1', '4', 'TP ' at line 1

Please help me!

Upvotes: 1

Views: 53

Answers (1)

Barmar
Barmar

Reputation: 782508

DESC is a reserved word. If you want to use it as a column name, you have to quote it with backticks.

Upvotes: 3

Related Questions