I\'m new in PHP and I\'m getting this error:
Notice: Undefined index: productid in /var/www/test/modifyform.php on line 32
Notice: Undef
There should be the problem, when you generate the . I bet the variables $name, $price are NULL or empty string when you echo them into the value of the field. Empty input fields are not sent by the browser, so $_POST will not have their keys.
Anyway, you can check that with isset().
Test variables with the following:
if(isset($_POST['key'])) ? $variable=$_POST['key'] : $variable=NULL
You better set it to NULL, because
NULL value represents a variable with no value.