PHP

idearnilino

New Member
I'm writing a sendmail script in PHP at the moment. It's largely based around what a user selects in a menu dropdown.The menu looks like this:\[code\]<select name="program"> <option value="http://stackoverflow.com/questions/3621254/Red Program">Red Program</option> <option value="http://stackoverflow.com/questions/3621254/Green Program">Green Program</option> <option value="http://stackoverflow.com/questions/3621254/Yellow Program">Yellow Program</option> <option value="http://stackoverflow.com/questions/3621254/Blue Program">Blue Program</option> <option value="http://stackoverflow.com/questions/3621254/Orange Program">Orange Program</option> ...\[/code\]I'll need to evaluate what option has been selected from this menu and send the title of the program to someone in an email. However, half of the programs will need to be sent to one address, the other half to a different address. What's the best way to both return the name of the program and evaluate what has been selected to see what address it should be sent to? Is there an easier way than writing an if statement for every possible value?Thanks!
 
Back
Top