I am trying to pass a variable from a dynamic drop down menu. But the value is no being posted to script.php when I click submit. I have posted both pages of code. If any body sees what I am missing please let me know.
here is the page with the drop down and submit button.
[CODE]<?php
include “connect.php”;
$query=”SELECT * from strata_links order by name”;
$result=mysql_query($query) or die (“Unable to Make the Query:” . mysql_error() );
echo “<form name=’form1′ method=’post’ action=’script.php’>n”;
echo “<select name=’people’>n”;
while ($row = mysql_fetch_assoc($result))
{
echo “<option name=”option” value=”$row[name]”>$row[name]</option>n”;
//echo “<option value=’.$row[‘description’]’ name=’option’>{$row[‘description’]}</option>n”;
}
echo “</select>n”;
echo “<input type=’submit’ name=’submit’ value=’submit’>n”;
echo “</form>n”;
?>
Here is the script.php page that should echo the value of the posted variable.
[CODE]
<?
include “connect.php”;
if (isset($_POST[‘submit’])) // name of submit button
{
$choice=$_POST[‘option’];
echo “this is your choice”.$choice;
}
else{
print “<center>”;
print “<table>”;
print “<tr><td><center>please select a File first</center></td></tr>”;
print “<tr><td><center>”;
print “Wrong username or password or unactivated account, redirecting back to login page… <META HTTP-EQUIV = ‘Refresh’ Content = ‘2; URL =getimage.php’></center>”;
print “</td></tr></table></center>”;
}
?>