Help mailing HTML forms

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tyler Hole
Forum Newbie
Posts: 1
Joined: Thu Jan 29, 2004 10:34 pm

Help mailing HTML forms

Post 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
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post by uberpolak »

You may be getting trouble because your variable name starts with a number, try renaming it to something like $six.
Post Reply