I just know that I'm going to kick myself when I find the solution, but so far it has eluded me. I've setup a select box in a table. I also have a switch statement. I want the switch statement to retrieve the value in the the select box and output the remainder of the table. I'd like to use variables too, but I think I can get that to work if I could just trigger the switch statement. I'm sure there are better ways to do this, but I'm new and I'm trying to code within my abilities as I learn the basics. Any help would be greatly appreciated. The test code I'm using is below:
<?php
echo "<html><body><form><table width=804 cellpadding='8' name='ticket'>";
echo "<tr><td width=200>Performance</td><td width=175>Date and Time</td><td width=150>Price per Ticket</td>";
echo "<td width=150>Quantity</td><td width=125>Total</td><br></tr>";
echo "<tr><td><select name='performer'><option value='empty' selected></option>";
echo "<option value='avetts'>The Avett Brothers</option><option value='boniver'>Bon Iver</option>";
echo "<option value='ironandwine'>Iron and Wine</option><option value='revpeyton'>";
echo "Rev. Peytons Big Damn Band</option><option value='johnbutlertrio'>John Butler Trio</option>";
echo "</select></td><td>";
switch (performer) {
case " ":
echo " </td></tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr></table></form>";
break;
case "avetts":
echo "May 8, 9:00pm</td></tr><tr><td>$15.00</td></tr><tr><td>1</td></tr><tr><td></td></tr><tr><td></td></tr></table></form>";
break;
case "boniver":
echo "May 22, 9:00pm</td></tr><tr><td>$15.00</td></tr><tr><td>1</td></tr><tr><td></td></tr><tr><td></td></tr></table></form>";
break;
case "ironandwine":
echo "June 5, 9:00pm</td></tr><tr><td>$15.00</td></tr><tr><td>1</td></tr><tr><td></td></tr><tr><td></td></tr></table></form>";
break;
case "revpeyton":
echo "June 19, 9:00pm</td></tr><tr><td>$15.00</td></tr><tr><td>1</td></tr><tr><td></td></tr><tr><td></td></tr></table></form>";
break;
case "johnbutlertrio":
echo "July 3, 9:00pm</td></tr><tr><td>$15.00</td></tr><tr><td>1</td></tr><tr><td></td></tr><tr><td></td></tr></table></form>";
break;
}
echo "</body></html>";
?>