Jump to content

Checkbox FormMailer help!!!


dandaman2007

Recommended Posts

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/Request_Forms/Print_Form/Print_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

Link to comment
https://forums.phpfreaks.com/topic/47409-checkbox-formmailer-help/
Share on other sites

hi,

 

im not 100% sure this will help but i have done a similiar thing ages ago that i craeted a fix for:

 

if ($checkbox1 != ""){
include("../email.php");
}

if ($checkbox2 != ""){
include("../email.php");
}

if ($checkbox3 != ""){
include("../email.php");
}

if ($checkbox4 != ""){
include("../email.php");
}


if ($checkbox5 != ""){
include("../email.php");
}

for each of your check boxes, you obviously allocate a variable to it:

lets so the Emplyee's name is Danny (as per your example):

 

so your checkbox code will be:

<input type="checkbox" name="Danny" value="Danny"/> - Danny

 

then what you do on the submit page is check if Danny has a value, if it does include the "email.php" page that sends Danny the email.

 

i.e.

if ($Danny != ""){
     $email = "[email protected]";
     include("../email.php");
}

 

if Danny is not selected the if statement will not execute.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.