Advertisement
Guest User

Untitled

a guest
May 27th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <div align="center">
  2. <table width="900" border="1">
  3. <tr>
  4. <td>
  5. <form name="to" method="post" action="testinfo.php">
  6. <select name="menu1">
  7. <option value="class_1" <? if($_POST['to'] == "All Users"){ ?> selected <? } ?>>All Users</option>
  8. <option value="class_2" <? if($_POST['to'] == "Inactive"){ ?> selected <? } ?>>Inactive</option>
  9. <option value="class_3" <? if($_POST['to'] == "Disabled"){ ?> selected <? } ?>>Disabled</option>
  10. <option value="class_4" <? if($_POST['to'] == "Unverified"){ ?> selected <? } ?>>Unverified</option>
  11. <option value="class_5" <? if($_POST['to'] == "Warned"){ ?> selected <? } ?>>Warned</option>
  12. </select>
  13. <label>
  14. <input type="submit" name="Submit" value="SHOW">
  15. </label>
  16. </form>
  17. </td>
  18. </tr>
  19. <tr>
  20. <td>
  21. <?php
  22. $to = '';
  23. echo "Traveling to $to<br />";
  24. switch ($_POST['to']){
  25. case "class_1":
  26. echo "Bring an extra $500";
  27. break;
  28. case "class_2":
  29. echo "Bring an open mind";
  30. break;
  31. case "class_3":
  32. echo "Bring 15 bottles of SPF 50 Sunscreen";
  33. break;
  34. case "class_4":
  35. echo "Bring lots of money";
  36. break;
  37. case "class_5":
  38. echo "Bring a swimsuit";
  39. break;
  40. default:
  41. echo "Bring lots of underwear!";
  42. break;
  43.  
  44. }
  45. ?>
  46. </td>
  47. </tr>
  48. </table>
  49. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement