Advertisement
t3cho

Untitled

Jun 25th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. <html>
  2. <body>
  3. <fieldset>
  4. <legend> Question1 </legend>
  5. <form method = "POST">
  6. <input type="submit" name="answer" id="1" value="1" />
  7. <input type="submit" name="answer" id="2" value="2" />
  8. <input type="submit" name="answer" id="3" value="3" />
  9. <input type="submit" name="answer" id="4" value="4" />
  10. <input type="submit" name="answer" id="5" value="5" />
  11. </form>
  12. </fieldset>
  13. </body>
  14. </html>
  15.  
  16. <?php
  17.  
  18. if(isset($_POST['answer']))
  19. {
  20. switch($_POST['answer'])
  21. {
  22. case "1":
  23. $answer = "1st Answer";
  24. break;
  25. case "2":
  26. $answer = "2nd Answer";
  27. break;
  28. case "3":
  29. $answer = "3rd Answer";
  30. break;
  31. case "4":
  32. $answer = "4th Answer";
  33. break;
  34. case "5":
  35. $answer = "5th Answer";
  36. break;
  37. default:
  38. $answer = "none";
  39. }
  40.  
  41.  
  42.  
  43. $ime = 'DreaminCode';
  44. $to = 'anel_001@hotmail.com';
  45. $subjekt = 'Info';
  46. $msg= 'User with name $ime answered on question . His answer is $answer ';
  47. $headers = 'From: test@ba.com';
  48. mail($to,$subjekt,$msg,$headers);
  49. }
  50.  
  51. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement