The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Basically this code checks for the item, price and quantity. If they are not set inthe form, then default values ('') are used. If they are set, then run the mysql_real_escape_string function on then to escape problem characters.
Then print the query so you can see that it looks correct.
Then execute the query, exiting if there is a problem.

I would have thought the SET version was better, because you can see exactly which value is going to what column in the table, where as with the VALUES version, you are relying on the order being the same in the INSERT and VALUES parts.