gharper Posted February 26, 2009 Share Posted February 26, 2009 Its been years since I've used PHP and I know what I want to do is fairly simple, but its giving me fits nonetheless. Basically, I've set up a Select Box in the first cell of a row. If the user selects an option, say "apple," then the next cell would echo "red" for the color, and the third cell would echo "apple pie." If the user had selected "banana," the other cells might display "yellow" and "banana split." You get the idea. I'm taking a class to reacquaint myself with PHP and we're not to use a DB yet, so I was trying to setup a SWITCH statement where the select box is the condition variable, and the cases would set the variables for color and dessert. After the switch statement, I would just need to echo the variables in the appropriate cell. Any help would be greatly appreciated. None of my books or researching online have helped. Thanks so much! Link to comment https://forums.phpfreaks.com/topic/147042-select-box-determines-displayed-values/ Share on other sites More sharing options...
CloudSex13 Posted February 26, 2009 Share Posted February 26, 2009 Sounds like you could use an array! http://www.w3schools.com/php/php_arrays.asp Link to comment https://forums.phpfreaks.com/topic/147042-select-box-determines-displayed-values/#findComment-771950 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.