Page 1 of 1

Help mailing HTML forms

Posted: Thu Jan 29, 2004 10:34 pm
by Tyler Hole
Ok, I'm pretty much a newbie to PHP and I have a book but it doesn't really explain much about mailing HTML forms. Now I have written the form which is located at http://dsl.whmoh.com/registerclan.html

I have written the code to as much of my knowledge as possible to get this to work right. It sends all the text fields perfectly, but it gives me the variable name instead of the value of the radio button. I have radio buttons as you can see if you look at the form for selection. Take 6v6 TDM Classic one for example. The name for both the radio buttons is "6v6tdmclassic" and the value for the first one is "yes" and the value for the second is "no".

With either one I select it just gives me $6v6tdmclassic as the value when I recieve the email.

Here is the little script I've written based on what the book told me:

Code: Select all

<?php
$to = "admin@whmoh.com";
$subject = "Clan Registration";
$message = "Clan Name: $clanname\nClan Leader: $clanleader\nContact E-mail: $eMail\n6v6 TDM Classic: $6v6tdmclassic\nClan Members: $clanmembers";
mail( $to, $subject, $message, "$from");
?>
Someone please help me out.

Best Regards,
Tyler Hole

Posted: Sat Feb 07, 2004 11:03 am
by uberpolak
You may be getting trouble because your variable name starts with a number, try renaming it to something like $six.