M.E. Suliman wrote:
> Hi
> 
> I know this might be a bit easy for all you experts out there.  I have
> multiple checkboxes and text areas in a form.  In the confirmation email
> sent to the user I manage to get the text areas to display in the email.
> How would I get the results of the  checkboxes to to display as well?
> 
> Thanks in advance
> 
> Mohamed
> 
> 
> 

checkboxes are like any other input, yo ugive them a name and optionally 
a value, and if they are selected when the form is sent then the 
variable is set (usually to "on") or given the value that you assign it.

For example: <input type="checkbox" name="foo" value="bar"> would yield 
$_REQUEST['foo']=="bar" in the script.  Checkboxes can also use arrays, 
which usually prove to be more useful. i.e. <input type="checkbox" 
name="foo[apple]"> and <input type="checkbox" name="foo[banana]">

Anyways, to display it in HTML it's <?=$_REQUEST['foo']?> or echo 
$_REQUEST['foo']; depending on how you do things.  You can also use the 
$_POST or $_GET vars and accomplish the same thing depending on the 
mehtod you use or if register globals are on then it's just $foo;


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to