|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
checkboxes in mailform
Ok, so I got the textfileds working on my mailform just fine, but I can´t find any info on checkboxes.
Lets say I want a checkbox named toiletpaper (best I could think of at the moment) in my mailform... How would the php code look like? ...So when I get the mail sent to me, it would say: toiletpaper: yes |
|
#2
|
||||
|
||||
|
RE: checkboxes in mailform
Checkboxes only take values if they are checked, so you have to do things a little different than textfields. Here's how I would do it:
In your HTML form: Code:
<input type="checkbox" value="Y" id="toiletpaper"> Toilet paper? In your PHP code (assuming you are using POST in your form): |
|
#3
|
|||
|
|||
|
RE: checkboxes in mailform
Better read this FAQ
http://codewalkers.com/faq/2/29.html Thats how I would do it.. In HTML page name it in this fashion <input type="checkbox" name="mycheck[toiletpaper]" value="Y"> <input type="checkbox" name="mycheck[oilpaper]" value="Y"> <input type="checkbox" name="mycheck[somepaper]" value="Y"> In PHP I hope it makes sense.. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > checkboxes in mailform |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|