Jump to content
Elemental

checkbox validation and textarea format

Recommended Posts

Holo,

 

A couple of quick questions ...

 

First:

The following is working ...

 

HTML

<input type="checkbox" name="bookme" value="Yes" id="book_me" class="checkBx" />

PHP

php
if(empty($_POST['bookme'])) {
$bookme = "";
}

When I select the box and submit the form I receive an email and see that the box has been selected; my question is, is this the correct way to code a checkbox to achieve the result I want?

 

 

====================================================

 

Second question ...

 

I would like to format my <textarea> so that the "Message" I receive, via form submit, has a border?

I can format the html page with css, but when the form is submitted there's no outline (border) around the "Message" to make it stand out. Can this be done on my end using js or php or am I subject to the email application my hosting company offers?

 

 

Peace

 

 

Share this post


Link to post
Share on other sites

You can use isset to see if a checkbox was checked:

 

$bookme = isset($_POST['bookme']);
You can send an HTML email if you give it the correct mime type, where you can use CSS to style some of the text.

Share this post


Link to post
Share on other sites

justsomeguy,

 

thanks for the info.

 

 

Peace,

Share this post


Link to post
Share on other sites

Man, really? It is not the oppressive white man email company decision to decide how you WANT to format your email. It is for you to grow some g0@#s and format the email to what and how you want and use presentation format of css to what to want, BUT at the end! If user email app doesn't allow that format then you are $[#%@d anyway. :-)

Share this post


Link to post
Share on other sites

Man, really? It is not the oppressive white man email company decision to decide how you WANT to format your email. It is for you to grow some g0@#s and format the email to what and how you want and use presentation format of css to what to want, BUT at the end! If user email app doesn't allow that format then you are $[#%@d anyway. :-)

 

dsonesuk,

 

Thank you for your colorful syntax and use of expression's, I surely appreciate a colorful vocabulary.

 

 

Peace,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×