PDA

View Full Version : Form Help



thechoo
30-10-2005, 01:17 PM
All I really want is the code of a working SUBMIT button that submit's to a email address.
If anyone can help or get a code that works a HC is on their way to them!
I'll be able to do all the input and radio buttons etc.. But I can't get a working SUBMIT button.

Here's a basic code if it's helpful?

<form>
Forum Name:
<input type="text" name="firstname">
<input type="radio" name="***" value="male"> Male
<br>
<input type="radio" name="***" value="female"> Female
<form action=mailto:"**EMAIL**" subject="Quiz Submission" method="post" enctype="text/plain">
<table><tr><td>
</td></tr>
<tr><td align=center>
<INPUT TYPE="submit" value="Submit" style="color: #ffffff; background-color: #000000">
</td></tr></table>
</FORM>

nelly
30-10-2005, 01:22 PM
<input type="SUBMIT" name="Submit" value="ok">
</form>

thechoo
30-10-2005, 01:32 PM
that doesnt send it anywhere though

nelly
30-10-2005, 01:40 PM
<script language="php">
$email = $HTTP_POST_VARS[email];
$mailto = "email@address";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
</script>

Mentor
30-10-2005, 01:59 PM
your form tag, lacks the action="" attribute wich is needed so the form knows what to do with the inputs, once you click the submit button "/

plus if you lack php u can use my free form handler service
http://thybag.co.uk/index.php?p=formH

thechoo
30-10-2005, 03:09 PM
Oooh k, and I noticed the "" after I posted it. The above code makes no sense at all. :P

Mentor
30-10-2005, 03:26 PM
thus bit
<form action=mailto:"**EMAIL**" subject="Quiz Submission" method="post" enctype="text/plain">
should be at the top of the form where <form> is, and mailto: dosnt work in most browsers so u would need a form handler
http://thybag.co.uk/index.php?p=formH *advertises* tis free

Dan Williamson
30-10-2005, 10:18 PM
I recommend using Mentors form service as he's an expert in that sort of stuff, also read his tutorial.

- Dan

Want to hide these adverts? Register an account for free!