Jump to content

select box determines displayed values


gharper

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.