Checkbox FormMailer help!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

dandaman2007
Forum Newbie
Posts: 8
Joined: Tue Apr 17, 2007 10:34 am

Checkbox FormMailer help!!!

Post by dandaman2007 »

Hi guys,

Ive got this problem and i have no idea how to fix it. Ive been trying to do it in PERL, but thats not my strong point, and i know a lot more PHP than perl. But still dont know enough to try and achive what i want to do.

Basically i am trying to have a web form in which the company fills out the form and can select which people to send the form to.

http://www.ekayadvertising.com/Intranet ... _Form.html

Above is the example form.

So the form will ONLY be sent to those that checkboxes have been ticked...... Also it would be great if i could have a CC or a BCC option too, so the similar effect, when someone gets CC'ed in on an e-mail the other CC or BCC options that arnt ticked dont get CC'ed in on the E-mail.

Hope i am making sense, if anyone could clear this up for me i will love you for ever.

Thanks again

Danny
dandaman2007
Forum Newbie
Posts: 8
Joined: Tue Apr 17, 2007 10:34 am

Post by dandaman2007 »

BUMP!!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Way too soon to bump. There's a 24 hour period in our bumping rules. Don't do that again.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Have a look at http://www.swiftmailer.org and read over the documentation. The tutorials (the form one especially) should get you started.
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

What have you written besides the form? Are you familiar with mail()? You're basically going to compile the checked email addresses and add them to the cc and bcc headers respectively.

d11: he's well clear of the 24 hour period
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

aaronhall wrote:d11: he's well clear of the 24 hour period
Tue Apr 17, 2007 3:36 pm -> Wed Apr 18, 2007 7:45 am

16 hrs, 9 mins.
dandaman2007
Forum Newbie
Posts: 8
Joined: Tue Apr 17, 2007 10:34 am

Post by dandaman2007 »

sorry about the bump....... wont do again....

The thing is...... i dont know what im doing....... BUT i do understand what i need to do if that makes sense...

I need a script that collects the ticked vales from the checkboxs which will then populate those vales into the formmail script. CORRECT????

but i dont know how to right the script A) for the checkboxs and B) to implelment that into the formmail script.!!!! see my problem. i just dont know enough lol

Any extensive help would be really appreciated!

Thanks
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

d11wtq wrote:
aaronhall wrote:d11: he's well clear of the 24 hour period
Tue Apr 17, 2007 3:36 pm -> Wed Apr 18, 2007 7:45 am

16 hrs, 9 mins.
I'm seeing Tue Apr 17, 2007 8:36 am -> Wed Apr 18, 2007 12:45 am
dandaman2007
Forum Newbie
Posts: 8
Joined: Tue Apr 17, 2007 10:34 am

Post by dandaman2007 »

to be fair tough i posted the original thread at Tue Apr 17, 2007 10:36 am, and its no Wed Apr 18, 2007 09:00 am

Only just inside the 24 mark lol
dandaman2007
Forum Newbie
Posts: 8
Joined: Tue Apr 17, 2007 10:34 am

Post by dandaman2007 »

looks like we all have differnet times lol

Oh well, back to the problem lol
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

You don't need to use formmail in PHP; check out mail(). POST values are available in the $_POST array, and checked boxes are set as "on".
dandaman2007
Forum Newbie
Posts: 8
Joined: Tue Apr 17, 2007 10:34 am

Post by dandaman2007 »

so is that PHP script there is replace the formmail script i am currently calling????

if so, how do i then use the checkbox scenario with it?
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Read about form handling -- again, checkboxes are either set to "on" or "off" in $_POST. Build a string of those email addresses that were set to "on", and add them to the bcc or cc header when you call mail()
dandaman2007
Forum Newbie
Posts: 8
Joined: Tue Apr 17, 2007 10:34 am

Post by dandaman2007 »

thanks for the reply,

BUT..... i dont know how to do ANY of that lol

Ill read it again thoroughly and try and do something.

Thanks
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

The manual entry and tutorial should pretty much cover all of it. Any questions, come on back.
Post Reply