Hi,
I have an online pre-course questionnaire than consists of about 45 questions. I have written the php script to send the results to my e-mail address but because there is so many questions (some of which are rather long!) it takes me a long time to sort through the results. (all the questions only have a yes/no answer and a rate of 1-5)
The following code is an example of the script I am using - the actual script passes a lot more questions!!
<?php
$msg = "Name:\t$_POST[name]\n";
$msg .= "E-Mail:\t$_POST\n";
$msg .= "Dept:\t$_POST[dept]\n";
$msg .= "Ext:\t$_POST[ext]\n";
$msg .= "Have you used Excel 97?:\t$_POST[Q1]\n";
$recipient = "myemail@mywebaddress.com";
$subject = "Excel 97 Pre Course Questionnaire";
$mailheaders = "From: My Web Site <> \n";
$mailheaders .= "Reply To: $_POST[email]\n\n";
mail($recipient, $subject, $msg, $mailheaders);
echo "<HTML><HEAD><TITLE>Form Sent!</TITLE></HEAD><BODY>";
echo "<H1 align=center>Thank You, $_POST[name]</H1>";
echo "<P align=center>Your feedback has been sent.</P>";
echo "</BODY></HTML>";
?>
I was wondering if there was any way of receiving the results of the form into my inbox in the form of a table or even an html page.
I have considered using a database but for what I want to achieve it is more practical for me to receive the results via e-mail.
Thankyou in advance for your help,
Rachel
I have an online pre-course questionnaire than consists of about 45 questions. I have written the php script to send the results to my e-mail address but because there is so many questions (some of which are rather long!) it takes me a long time to sort through the results. (all the questions only have a yes/no answer and a rate of 1-5)
The following code is an example of the script I am using - the actual script passes a lot more questions!!
<?php
$msg = "Name:\t$_POST[name]\n";
$msg .= "E-Mail:\t$_POST\n";
$msg .= "Dept:\t$_POST[dept]\n";
$msg .= "Ext:\t$_POST[ext]\n";
$msg .= "Have you used Excel 97?:\t$_POST[Q1]\n";
$recipient = "myemail@mywebaddress.com";
$subject = "Excel 97 Pre Course Questionnaire";
$mailheaders = "From: My Web Site <> \n";
$mailheaders .= "Reply To: $_POST[email]\n\n";
mail($recipient, $subject, $msg, $mailheaders);
echo "<HTML><HEAD><TITLE>Form Sent!</TITLE></HEAD><BODY>";
echo "<H1 align=center>Thank You, $_POST[name]</H1>";
echo "<P align=center>Your feedback has been sent.</P>";
echo "</BODY></HTML>";
?>
I was wondering if there was any way of receiving the results of the form into my inbox in the form of a table or even an html page.
I have considered using a database but for what I want to achieve it is more practical for me to receive the results via e-mail.
Thankyou in advance for your help,
Rachel