Following from my first post I have just added "(id, name, price)" so the code now reads:
$sql = "INSERT INTO products (id, name, price) VALUES (null, '$name', '$price')";
$res = mysql_query($sql) or die(mysql_error());
Why did the author who provided the code not include this reference to the corresponding fields in the database. Are these essential?
It is now working but I would like to get the code done professionally.