(SOLVED by trincot)
I am trying to save a selected item from a dropdown menu as a variable called $name. The list is populated from a mysql table, so the list is filled automatically with the contents of a table's column called "App". The list is filled correctly, however I am having trouble saving what is selected using my "Go" button. Here is the code I have at the moment.
<form method="post" action="">
<?php
echo '<div align="center">';
echo '<p>Select Application ';
echo '<select name="AppChoose">';
while($row= mysql_fetch_array ($result)) {
echo '<option value="$row[\'App\']">' . $row['App'] . '</option>';
}
echo '</select>';
echo '</div>';
?>
<input type="submit" value="Go!">
</form>
<!-- Once you hit submit -->
<?php
if (isset($_POST['AppChoose'])){
$name = $_POST['AppChoose'];
echo $name;
}
?>
When Go! is pressed, the print of $name will only return "$row[App]" instead of the actual value of what was selected. I'm rather new at html and php, so any suggestions would be great. Thanks ahead of time!
I have already tried changing the $_POST save to double quotations to attempt to avoid the variable printing "as is" and that did not change the value of the variable at all.