Answer
Solution:
Let's take a look at this error: "Parse error: syntax error, unexpected identifier "prod_info", expecting "," or ";" in". The offending line is:
echo "<option name="prod_info">" . $row["prod_name"] . " $" . $row["prod_price"] . "</option>";
The issue here is that you are using double quotes nested inside another set of double quotes. Let's just look at the part before the first period [.].
The first thing happening here is that a string is defined and there is no syntax error:
"<option>"
Next, an attribute is added to the html<option>
tag:
"<option name="prod_info">"
There is a set of double quotes inside another set of double quotes which introduces a syntax error. I would suggest using single quotes for the outside and double quotes for the inside. The following code should fix your error:
echo '<option name="prod_info">' . $row["prod_name"] . " $" . $row["prod_price"] . "</option>";
Fixing this issue should also fix your undefined index issue however, I should add that it is always best to check if an array key exists before calling it. Instead of:
$prod_info = $_POST['prod_info'];
You might want to do something like:
$prod_info = isset($_POST['prod_info']) ? $_POST['prod_info'] : '';
or, if you are using php 7.4+:
$prod_info = $_POST['prod_info'] ?? '';