|
| |
|
|
littletiny45
Posts: 25 Joined: 6/3/2008 Status: offline
|
Emailing form content - 6/19/2008 13:46:07
I created a php form to pass the forms content to my email. All fields pass with the exception of the radio buttons. The radio button that's selected will not come to my email address. How do you get the selected radio button to show up in your email? Here's my radio buttons on the form: <tr> <td colspan="2" valign="top" align="right"><strong>What type web site?</strong>*</td> <td colspan="2" valign="top"><input type="radio" name="purpose" value="business" id="business">Business<br> <input type="radio" name="purpose" value="personal" id="personal">Personal</td> </tr> <tr> <td colspan="3" valign="top" align="right"><strong>What is your intended budget for the web site?</strong>*</td> <td valign="top"><input type="radio" name="budget" value="thousand"> Less than $1,000<br> <input type="radio" name="budget" value="twothou"> $1,001 - $2,000<br> <input type="radio" name="budget" value="fourthou"> $2,001 - $4,000<br> <input type="radio" name="budget" value="more"> $4,001 or More</td> </tr> Here's the radio button part of my php form: $thousand = RemoveXSS( $_REQUEST['thousand'] ); $twothou = RemoveXSS( $_REQUEST['twothou'] ); $fourthou = RemoveXSS( $_REQUEST['fourthou'] ); $more = RemoveXSS( $_REQUEST['more'] ); $headers = "From: $email"; $message1 = "Name: $first $last | Phone Number: $phone | Email: $email"; $message2 = "Purpose: $business $personal"; $message3 = "Budget: $thousand $twothou $fourthou $more"; $message4 = "Concept: $concept"; When I get an email it just says Purpose: | Budget: (both are blank even though I know something was selected)
|
|
|
|
ou812
Posts: 1572 Joined: 1/5/2002 From: San Diego Status: online
|
RE: Emailing form content - 6/19/2008 16:24:54
You need to grab the contents of budget and purpose, the name of your radio buttons. $mybudget = RemoveXSS( $_REQUEST['budget'] ); $mypurpose = RemoveXSS( $_REQUEST['purpose'] ); $headers = "From: $email"; $message1 = "Name: $first $last | Phone Number: $phone | Email: $email"; $message2 = "Purpose: $mypurpose"; $message3 = "Budget: $mybudget"; $message4 = "Concept: $concept";
_____________________________
-brian EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
|
|
littletiny45
Posts: 25 Joined: 6/3/2008 Status: offline
|
RE: Emailing form content - 6/19/2008 16:50:56
Thanks a lot OU812 that worked!! One more question. Is there a way to get the messages to appear on separate lines in the email?
|
|
|
|
ou812
Posts: 1572 Joined: 1/5/2002 From: San Diego Status: online
|
RE: Emailing form content - 6/19/2008 19:16:34
I'm guessing you are sending text email. If so, I believe the "\n" should work. Something like: $message1 = "Name: $first $last | Phone Number: $phone | Email: $email \n"; $message2 = "Purpose: $mypurpose \n"; $message3 = "Budget: $mybudget \n"; $message4 = "Concept: $concept \n";
_____________________________
-brian EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|