... Here's a tester for the code to show it works ... You could also test the data in the result like this: ... and if you are going to submit that form you will also want to move the </form> tag to after the select box or the select box data won't be submitted or other fields will be missing
I have just noticed that you posted the structure and contents of the tables in your post, sory. You are missing the ... column in the ... table. You are referring to the ... column in the while loop. And as Biiim said, associative indexes (keys) are case sensitive while mysql names are not. I would strongly suggest that you use always lowercase to avoid confusion. Also chose table names and field names carefully and…
in phpmyadmin (or mysql client) and see if you get the correct resultset for options in your select. If the query returns correct result then check the html code (in Firefox right click -> View page source) and check whether there are no html errors also.
You might want to check whether isSelected($item['po'],$batch) function returns correct value.
// combo box
<select name="batch" onchange="submit();">
<option value="-1" >-- Select Adress --</option>
Resource id #4<br />
<b>Notice</b>: Undefined index: po in <b>C:\xampp\htdocs\Innovation\script_shop\stock.php</b> on line <b>48</b><br />
<b>Fatal error</b>: Call to undefined function isSelected() in <b>C:\xampp\htdocs\Innovation\script_shop\stock.php</b> on line <b>48</b><br />
This is mysterious. The code in the snippet you posted seem to be OK (once corrected with suggestions from other posts). Can you post the whole code? I would have to test it in my environment to try to find something.