Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <fieldset>
- <legend> Question1 </legend>
- <form method = "POST">
- <input type="submit" name="answer" id="1" value="1" />
- <input type="submit" name="answer" id="2" value="2" />
- <input type="submit" name="answer" id="3" value="3" />
- <input type="submit" name="answer" id="4" value="4" />
- <input type="submit" name="answer" id="5" value="5" />
- </form>
- </fieldset>
- </body>
- </html>
- <?php
- if(isset($_POST['answer']))
- {
- switch($_POST['answer'])
- {
- case "1":
- $answer = "1st Answer";
- break;
- case "2":
- $answer = "2nd Answer";
- break;
- case "3":
- $answer = "3rd Answer";
- break;
- case "4":
- $answer = "4th Answer";
- break;
- case "5":
- $answer = "5th Answer";
- break;
- default:
- $answer = "none";
- }
- $ime = 'DreaminCode';
- $to = 'anel_001@hotmail.com';
- $subjekt = 'Info';
- $msg= 'User with name $ime answered on question . His answer is $answer ';
- $headers = 'From: test@ba.com';
- mail($to,$subjekt,$msg,$headers);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement