MUUYT Posted June 13, 2008 Share Posted June 13, 2008 i have some languages in a drop down menu take a look <form action="lang.php" method="post"> Select Language : <br> <select name="language" > <option value="English">English</option> <option value="Spanish">Spanish</option> <option value="French">French</option> </select> <BR> <Input type="submit" value="GO!"> </p> </form><BR> <?php $language = $_POST[language] if ($language=="English") { echo "You Have Selected English"; } else if ($language) { echo "Usted Ha Seleccionado Español"; } else ($language) { echo "Vous Avez Choisi le Français"; } ?> Link to comment https://forums.phpfreaks.com/topic/110132-how-to-change-html-option-to-on-each-option/ Share on other sites More sharing options...
DarkWater Posted June 13, 2008 Share Posted June 13, 2008 What exactly are you trying to do? O_O And do you really want it to say like "Vous Avez Choisi le Français"? Like, why are you capitalizing everything? You should make it say like: Langue: Français On top of the page. Link to comment https://forums.phpfreaks.com/topic/110132-how-to-change-html-option-to-on-each-option/#findComment-565198 Share on other sites More sharing options...
MUUYT Posted June 13, 2008 Author Share Posted June 13, 2008 i want when you pick french you get the echo when you pick english you get the echo Link to comment https://forums.phpfreaks.com/topic/110132-how-to-change-html-option-to-on-each-option/#findComment-565203 Share on other sites More sharing options...
DarkWater Posted June 13, 2008 Share Posted June 13, 2008 <form action="lang.php" method="post"> Select Language : <br /> <select name="language"> <option value="English">English</option> <option value="Spanish">Spanish</option> <option value="French">French</option> </select> <BR /> <Input type="submit" value="GO!"> </p> </form><BR /> <?php $language = $_POST['language']; if ($language=="English") { echo "You Have Selected English"; } else if ($language == "Spanish") { echo "Usted Ha Seleccionado Español"; } elseif ($language == "French") { echo "Vous Avez Choisi le Français"; } else { echo "Invalid Language."; } ?> O_O Link to comment https://forums.phpfreaks.com/topic/110132-how-to-change-html-option-to-on-each-option/#findComment-565218 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.