PHP question (newbie)
- Started
- Last post
- 9 Responses
- kwongkweng
How to create a checkbox and send the results to my email?
(theres gotta be two files, 1 html file and a .php file where all the action happens)
lets say theres 3 checkboxes --> banana[] apple [] grapes [] , and the user checked on banana and apple. and i want to send the information to my email...
:(--- THANK YOU
- ********0
if(isset($_POST['my_var'])) {
$tr_author = '1'; }if(!isset($_POST['my_var'])) {
$tr_author = '0'; }
- Nac_part20
you can do it all in one php file if you want...
just make sure your checkboxes have the attributes of something like
name="bananas"
i think i may have a mail script you can modify
so you can have it email to yourself
but its honestly just one function "mail"
like mail you the results, and then constructing an answer to send back to the user...
i know i think i just may have confused you but i think i confused myself also ;)
- UndoUndo0
where 'my_var' is the name of yr checkbox
- ********0
Unless you need help from the ground up... It's late, and I could help you monday.
Read this:
http://uk.php.net/manual/en/tuto…
- ********0
Shit that was a trifle confusing:
CORRECTIONif(isset($_POST['my_ var'])) {
$my_var = '1'; }if(!isset($_POST['my _var'])) {
$my_var = '0'; }
- kwongkweng0
thanks for replies. but im still confused like a confused person :-(
so lets say in my html -->
apple
banana
-----------------------
so what has to be in my php file?
thanks
- ********0
Did you look at the examples on PHP.net?
- kwongkweng0
(the html code didnst show up from my last post, sorry about that)
form id="form" name="form" method="post" action="form.php">
applebanana
- ********0
http://www.determinedmoth.org/te…
Hope that maybe helps..