I have created a dynamic dropdown menu list which lists a column in a database. I can get that to show up fine but when I want to submit a result and POST that to another file all I get is an 'undefined' index error. Here is the last aprt of my index.php file.
<select name="bob">
<?php
while($row = mysqli_fetch_assoc($result))
{
extract ($row);
echo "<option value='$forename'>$forename</option>\n";
}
?>
</select>
<form action='processnames.php' method='POST'>
<input type='submit' value='Submit' />
</form> </body> </html>
The processnames.php has the following code:
Welcome <?php
session_start();
echo $_POST["bob"]; ?><br />
Any help would be greatly appreciated. Thanks!