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
This is happening because your PHP code is getting executed before the form gets posted.
To avoid this wrap your PHP code in following if statement and it will handle the rest no need to set if statements for each variables
if(isset($_POST) && array_key_exists('name_of_your_submit_input',$_POST))
{
//process PHP Code
}
else
{
//do nothing
}