I'm coding a website for an online DVD rental and booking system and trying to call into a dropdown menu the DVDID which is the primary key and the title of the DVDs in my phpmyadmin data base but when I try to call the ID in it does not work. Any help would be appreciated.
<form name="FrmAmend" method="post" action="amenddvd2.php">
Select from the list below<br>
<select name="Film" title="Select DVD">
<option value="" selected disabled>Select DVD</option>
<?php
$result = mysqli_query($con, "SELECT `DVDID`, `Title` FROM tbldvd;");
$row = mysqli_fetch_assoc($result);
foreach ($result as $row) {
echo "<option value='" . $row['DVDID'] . $row['Title'] . "'>" . $row['DVDID'] . $row['Title'] . "</option>";
}
?>
</select><br>
<a href="menu.php"</a>Return To Main Menu<br>
<input type="submit" name="Submit" value="Select DVD">
</a>
</form>