Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Need help with radio button value to email
Old 09-02-2010, 07:57 AM Need help with radio button value to email
Junior Talker

Posts: 2
Name: Alan
Trades: 0
Dear all,

Hi! Currently i'm setting up a page regarding only radio button and no textbox/textarea. After i click on the summit button, it will mail all the button that i had tick and send it to my email. I had tried the coding couple of times and still can't work, hope you all guys kind enough to help me out. Thanks!

This is my html coding:

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<link type="text/css" rel="stylesheet" href="award.css"> 
<title>::Baller Award::</title> 
</head> 

<body> 

<div class="main_body"> 
<div class="top"> 
<div class="top_logo_left"></div> 
<div class="top_logo_right"></div> 
</div> 

<div class="mid_info"> 
<div class="mid_inside">Welcome to the first annual Baller Awards, where you our readers choose who you think are the <br /> 
most notable poker players of the Asia-Pacific region for 2010</div> 
</div> 


<form id="form1" name="form1" method="post" action="baller_award.php"> 

<div class="btm_info_whole"> 



<div class="btm_info"> 
<div class="btm_info_inside"> 
<div class="btm_info_inside_top"> 
<span>Baller Fan Favourite</span> 
<br /> 
<br /> 
Where you pick the player who you think has done the most for the Asia-Pacific poker scene. <br /> 
<br /> 
</div> 
<div class="btm_player_box"> 

<div class="btm_player"><img src="award_images/Baller_player_03.png" /></div> 
<div class="btm_player1"><img src="award_images/Baller_player_05.png" /></div> 
<div class="btm_player1"><img src="award_images/Baller_player_07.png" /></div> 
<div class="btm_player1"><img src="award_images/Baller_player_09.png" /></div> 
<div class="btm_player1"><img src="award_images/Baller_player_11.png" /></div> 
</div> 

<div class="radio_bt"> 
<div class="radio_btm_box"> 
<label> 
<input type="radio" name="radio" id="Raymond" value="Raymond" /> 
</label> 
</div> 
<div class="radio_btm_box1"> 
<label> 
<input type="radio" name="radio" id="Bryan_Huang" value="Bryan_Huang" /> 
</label> 
</div> 
<div class="radio_btm_box2"> 
<label> 
<input type="radio" name="radio" id="Neil_Arce" value="Neil_Arce" /> 
</label> 
</div> 
<div class="radio_btm_box3"> 
<label> 
<input type="radio" name="radio" id="Neil_Arce" value="Neil_Arce" /> 
</label> 
</div> 
<div class="radio_btm_box4"> 
<label> 
<input type="radio" name="radio" id="Simon_Watt" value="Simon_Watt" /> 
</label> 
</div> 
</div> 
</div> 

<div class="btm_info_inside"> 
<div class="btm_info_inside_top"> 
<span>Baller Player Of The Year</span> 
<br /> 
<br /> 
Voted for by our panel of judges, this player will be the most deserving of the title, having performed consistently and enjoyed a great year at the felt. <br /> 
<br /> 
</div> 
<div class="btm_player_box"> 

<div class="btm_player"><img src="award_images/Baller_player_03.png" /></div> 
<div class="btm_player2"><img src="award_images/Baller_player_05.png" /></div> 
<div class="btm_player2"><img src="award_images/Baller_player_20.png" /></div> 
<div class="btm_player2"><img src="award_images/Baller_player_22.png" /></div> 
<div class="btm_player2"><img src="award_images/Baller_player_11.png" /></div> 
</div> 

<div class="radio_bt"> 
<div class="radio_btm_box"> 
<label> 
<input type="radio" name="radio1" id="Raymond" value="Raymond" /> 
</label> 
</div> 
<div class="radio_btm_box1_1"> 
<label> 
<input type="radio" name="radio1" id="Bryan_Huang" value="Bryan_Huang" /> 
</label> 
</div> 
<div class="radio_btm_box2_2"> 
<label> 
<input type="radio" name="radio1" id="Bihn_Nguyen" value="Bihn_Nguyen" /> 
</label> 
</div> 
<div class="radio_btm_box3_3"> 
<label> 
<input type="radio" name="radio1" id="Tony_Hachem" value="Tony_Hachem" /> 
</label> 
</div> 
<div class="radio_btm_box4_4"> 
<label> 
<input type="radio" name="radio1" id="Simon_Watt" value="Simon_Watt" /> 
</label> 
</div> 
</div> 
</div> 

<div class="btm_info_inside"> 
<div class="btm_info_inside_top"> 
<span>Baller Female Player Of The Year</span> 
<br /> 
<br /> 
Voted for by our panel of judges, this will be the Asia-Pacific regions most deserving top female poker player of 2010. <br /> 
<br /> 
</div> 
<div class="btm_player_box"> 
<div class="btm_player"><img src="award_images/Baller_player_30.png" /></div> 
<div class="btm_player3"><img src="award_images/Baller_player_33.png" /></div> 
<div class="btm_player3"><img src="award_images/Baller_player_35.png" /></div> 
<div class="btm_player3"><img src="award_images/baller_03.png" /></div> 
<div class="btm_player3"><img src="award_images/Baller_player_38.png" /></div> 

</div> 

<div class="radio_bt"> 
<div class="radio_btm_box"> 
<label> 
<input type="radio" name="radio2" id="Celina_Lin" value="Celina_Lin" /> 
</label> 
</div> 
<div class="radio_btm_box1_2"> 
<label> 
<input type="radio" name="radio2" id="Kim_Wooka" value="Kim_Wooka" /> 
</label> 
</div> 
<div class="radio_btm_box2"> 
<label> 
<input type="radio" name="radio2" id="Jessica_Ngu" value="Jessica_Ngu" /> 
</label> 
</div> 
<div class="radio_btm_box3_2"> 
<label> 
<input type="radio" name="radio2" id="Percy_Yung" value="Percy_Yung" /> 
</label> 
</div> 
<div class="radio_btm_box4"> 
<label> 
<input type="radio" name="radio2" id="Sarah_Lee" value="Sarah_Lee" /> 
</label> 
</div> 
</div> 
</div> 

<div class="btm_info_inside"> 
<div class="btm_info_inside_top"> 
<span>Baller Rookie Of The Year</span> 
<br /> 
<br /> 
Voted for by our panel of judges, this player will be the most promising recent addition to the tournament poker scene who has made their mark in 2010. <br /> 
<br /> 
</div> 
<div class="btm_player_box"> 

<div class="btm_player"><img src="award_images/Baller_player_45.png" /></div> 
<div class="btm_player1"><img src="award_images/Baller_player_47.png" /></div> 
<div class="btm_player1"><img src="award_images/Baller_player_49.png" /></div> 
<div class="btm_player1"><img src="award_images/Baller_player_51.png" /></div> 
<div class="btm_player1"><img src="award_images/Baller_player_53.png" /></div> 
</div> 

<div class="radio_bt"> 
<div class="radio_btm_box"> 
<label> 
<input type="radio" name="radio3" id="Tyron_Krost" value="Tyron_Krost" /> 
</label> 
</div> 
<div class="radio_btm_box1_2"> 
<label> 
<input type="radio" name="radio3" id="Gordon_Huntly" value="Gordon_Huntly" /> 
</label> 
</div> 
<div class="radio_btm_box2"> 
<label> 
<input type="radio" name="radio3" id="Victor_Chen" value="Victor_Chen" /> 
</label> 
</div> 
<div class="radio_btm_box3_2"> 
<label> 
<input type="radio" name="radio3" id="Jessica_Ngu" value="Jessica_Ngu" /> 
</label> 
</div> 
<div class="radio_btm_box4_3"> 
<label> 
<input type="radio" name="radio3" id="Alex_Loon" value="Alex_Loon" /> 
</label> 
</div> 
</div> 
</div> 
</div> 

<div class="buttom"><input type="image" src="award_images/button_03.png" border="0" name="submit" /></div> 
</div> 

</form> 

</div> 
</body> 
</html> [/COLOR]

This is my php coding: 

[COLOR="red"]<?php 

$radio = $_POST["radio"]; 

$radio1 = $_POST["radio1"]; 

$radio2 = $_POST["radio2"]; 

$radio3 = $_POST["radio3"]; 

mail( "alan_tmc@hotmail.com", "sentence1:$radio", "sentence2: $radio1", "sentence3:$radio2", "sentence4:$radio3"); 

?>
Can anyone tell me what is wrong with my coding? Please and Thanks!

Last edited by chrishirst; 09-03-2010 at 08:09 PM..
Endlesz is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-02-2010, 08:26 AM Re: Need help with radio button value to email
NullPointer's Avatar
Will Code for Food

Posts: 2,774
Name: Matt
Location: Irvine, CA
Trades: 0
Take a closer look at the mail function documentation:
http://us2.php.net/manual/en/function.mail.php

PHP Code:
$to      'nobody@example.com';
$subject 'the subject';
$message 'hello';
$headers 'From: webmaster@example.com' "\r\n" .
    
'Reply-To: webmaster@example.com' "\r\n" .
    
'X-Mailer: PHP/' phpversion();

mail($to$subject$message$headers); 
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Reply     « Reply to Need help with radio button value to email
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.77903 seconds with 12 queries