PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
now i want to display on DISPLAY.PHP
the value of that which user selected in dropdownlist
like user select red option. then on next page there shuld b display RED and also there shuld b display RED COLOR.......
can any one tell me how can i dot this ?
AFAIK you can only get the values from the drop down menu. Meaning if the user selected red, $_POST['mydropdown'] would return color 2. I dont know if its possible to get the text as well, but usually only the value is important
//simplest way
//would fire error if mydropdown was not set
echo $_POST['mydropdown'];
//better way
echo (!empty($_POST['mydropdown']) ? $_POST['mydropdown'] : 'My Drop Down was not set');
If you actually want it to display RED, then your going to have to change your form