close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Checkbox value in email

Thread began 5/16/2013 4:53 pm by YellowCircleWeb | Last modified 5/17/2013 11:00 am by YellowCircleWeb | 1360 views | 6 replies |

YellowCircleWeb

Checkbox value in email

I'm trying to send an email when a user registers that includes a value passed in from a checkbox.
The checkbox is not checked by default and has a value of 1 when it is checked by the user. This value gets inserted into my database after the form is submitted, but I cannot get it to display in the email message that's sent.

I've attached a copy of the email file.

Eventually I want to replace the checkbox value in the email with Yes and No text. I saw other posts on here with similar problems, but they all seemed to relate to groups of checkboxes, not just a single checkbox.

Any help is appreciated.

Attached Files
waue_register-user_2.zip
Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the form page so i can see how the form is configured.

Sign in to reply to this post

YellowCircleWeb

I've attached a copy of the form page as requested Jason.

Attached Files
register-user.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the code looks correct.

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

YellowCircleWeb

Replied in private message too

Sign in to reply to this post

Jason ByrnesWebAssist

the waue_register-user_2.php page on your server was different from the page you sent.

i fixed the issue by changing:

php:
$MailBody = $MailBody . "<p>Department head: ";

 if($_POST["chkDeptHead"] != "") { echo ("Yes"); } else { echo("No"); }



to:

php:
$MailBody = $MailBody . "<p>Department head: ";

$MailBody = $MailBody .  ((isset($_POST["chkDeptHead"]) && $_POST["chkDeptHead"] == "1")?"Yes":"No");
Sign in to reply to this post

YellowCircleWeb

Thanks for your help Jason. Much appreciated.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...