I have 2 small problems I need help with. My first issue is I have an online form that people fill out and send to me. The form works perfectly. However I want to add some text to the results so that when I get e-mailed the results I know what they are. For example:
Currently this is what my e-mails look like:
NY
Yes
No
I want them to look like:
State: NY
Visited this site before: Yes
Person want newsletter: No
That way when I get the e-mail I know what all the answers are for. Here is the relevant code:
PHP Code:
mail("my@emailaddress.com", ''.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$name."\n\n".$country."\n\n".$state."\n\n".$visited."\n\n".$hear."\n\n".$message, "From: $from");
My second problem is making radio buttons required. I have text fields and dropdown menus all figured out but I can't figure out how to make radio buttons required. Here is both of the relevant code:
Here is the form part:
PHP Code:
Have you visited this site before?:<br />
Yes:<input type="radio" id="visited" value="Yes" name="visited">No:<input type="radio" id="visited" value="No" name="visited">
Here is the verification script (that doesn't work for these radio buttons):
PHP Code:
<form action="mailtome.php" method="post" name="form1" id="form1" style="margin:0px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px; width:350px;" onsubmit="MM_validateForm('from','','RisEmail','subject','','R','verif_box','','R','name','','R','visited','','R','country','','R');return document.MM_returnValue">
One more thing I should mention... The first question about having text appear with the form results I tried echo " "; and I also tried print " "; It seems to break the script when I put that in there. I must be doing something wrong.
Thanks so much for any help!