if ($_POST)
{
echo "You chose ", $_POST;
}
else
{
$families = array ("Peter Griffin","Lois Griffin","Chris Griffin","Meg Griffin","Stewie Griffin") ;
echo '<form name="families" method="post" action="index.php"><select name="family">';
foreach ($families as $family)
{
echo '<option value="' . $family . '">' . $family . '</option>';
}
echo '<input type="submit">' ;
echo '</select></form>' ;
}
QuaminaIT 0 Newbie Poster
vaultdweller123 32 Posting Pro
grant.baker 10 Newbie Poster
vaultdweller123 32 Posting Pro
QuaminaIT 0 Newbie Poster
QuaminaIT 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.