Hi,
I have a small enquiry form on my website where users can answer some questions.
On the last page (results.php) I let the user see the answers he submitted by using the option
(example)
if($something==a value)
echo bla bla bla
I made a "Mail me the answers" link under this text. After clicking on it a pop-up window opens (popup name is mail.php)
I would like to see a mail form appear where the answers of the users are already 'printed' in the bodytext, subject is the 'site_title' and he only has to fill in his e-mail address so send the mail (using formmail.pl).
However I get several errors while mail.php is opened:
Warning: Unexpected character in input: '\' (ASCII=92) state=1
Parse error: parse error, expecting ','' or';''
This is the code line for the "Mail me the answers" link (on page results.php):
<a href="javascript:my_win1()" name="final" value="email">Mail me the answers</a>
Please see part of the script of mail.php below
<?
if ($final=="email") {
echo '<form action="usr/formmail.pl">'\n;
Email address: <input type="text" name="email" value="you@your_isp.com" size=30><br>\n;
Subject: <input type="text" name="T1" size="20" value='$site_title'> <br><br>\n;
<textarea cols=50 rows=10 wrap="virtual" name="message"></textarea> <br><br>\n;
<input type="submit" value="Submit">\n;
</form>';
}
?>
I hope anyone can see where I made the error in the script above. I also wonder why I use formmail.pl to send the mail !!????