So my code:
$productname = $_GET['productname'];
$productprice = $_GET['productprice'];
$productimage = $_GET['productimage'];
$productcat = $_GET['cat'];
$query = "INSERT INTO $tbl_name ('name, img, price, category') VALUES ('$productname, $productimage, $productprice, $cat')";
mysql_query($query);
$productprice = 1.99, the type on phpMyAdmin is set to decimal (2,2). When the query runs it isn't put in the db. I tired running as SQL on the db which returns;
SQL-query:
INSERT INTO products( name, img, price, category )
VALUES (
black pens, 007.jpg, **1.99**, stationary
)
MySQL said: Documentation
1064 - 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 'pens, 007.jpg, 19, stationary)' at line 1