<select name="shortcut">
<?php
$sql= "SELECT * FROM subject WHERE id_ped = $id_ped";
$vysledek0 = mysqli_query($con, $sql);
$count0 = mysqli_num_rows($vysledek0);
for($i=0;$i<$count0;$i++){
$row= mysqli_fetch_row($vysledek0);
echo "<option value=\"shortcut\">" . $row[1] . "</option>";"<br>";
}
?>
</select>
This gives me dropdown list where I can select data from certain table.
But I have trouble accessing the data later - for example like this:
<?php $shortcut = $_POST['shortcut'];
echo $shortcut;
?>
It doesn´t take in the list item but instead it takes the string ´shortcut´.
How do I use the list items as variable from this point?