I'm brand new to Sourceforge.net and haven't quite found a question about seeing no results for the checkboxes on an e-mail message. I'm having a blast with phpformgenerator and was able to customize everything into my form, but getting the checkbox results to show. I thought of pasting the code here so maybe someone can point me in the right direction. Thanks in advance!
FORM
<tr>
<td colspan="2" valign="top" class="Text"><label id="fieldBox_20">I’d like to sponsor Events and/or the Newsletter (please check one or both options below) </label></td>
</tr>
<tr>
<td colspan="2" valign="top" class="Text"><input type=checkbox name=field_20[] id=field_20_option_2 value="Events" />
<label id="field_20_option_2">Events</label>
<input type=checkbox name=field_20[] id=field_20_option_1 value="Newsletter" /><label id="field_20_option_1">Newsletter</label></td>
</tr>
Processor.php
I’d like to sponsor Events and/or the Newsletter (please check one or both options below) : $field_20_opts
E-mail Results
I’d like to sponsor Events and/or the Newsletter (please check one or both options below) :
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you look in the processor.php file you should see a line that looks like the following:
$field_20_opts = $_POST['field_20'][0].",". $_POST['field_20'][1];
Then a line for the mail function that looks like this:
I’d like to sponsor Events and/or the Newsletter (please check one or both options below) : $field_20_opts
The message should get the values for any option that has been checked, like this:
I’d like to sponsor Events and/or the Newsletter (please check one or both options below) : Events,Newsletter
Comma separated just like the $field_20_opts variable is assigned.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello -
I'm brand new to Sourceforge.net and haven't quite found a question about seeing no results for the checkboxes on an e-mail message. I'm having a blast with phpformgenerator and was able to customize everything into my form, but getting the checkbox results to show. I thought of pasting the code here so maybe someone can point me in the right direction. Thanks in advance!
FORM
<tr>
<td colspan="2" valign="top" class="Text"><label id="fieldBox_20">I’d like to sponsor Events and/or the Newsletter (please check one or both options below) </label></td>
</tr>
<tr>
<td colspan="2" valign="top" class="Text"><input type=checkbox name=field_20[] id=field_20_option_2 value="Events" />
<label id="field_20_option_2">Events</label>
<input type=checkbox name=field_20[] id=field_20_option_1 value="Newsletter" /><label id="field_20_option_1">Newsletter</label></td>
</tr>
Processor.php
I’d like to sponsor Events and/or the Newsletter (please check one or both options below) : $field_20_opts
E-mail Results
I’d like to sponsor Events and/or the Newsletter (please check one or both options below) :
If you look in the processor.php file you should see a line that looks like the following:
$field_20_opts = $_POST['field_20'][0].",". $_POST['field_20'][1];
Then a line for the mail function that looks like this:
I’d like to sponsor Events and/or the Newsletter (please check one or both options below) : $field_20_opts
The message should get the values for any option that has been checked, like this:
I’d like to sponsor Events and/or the Newsletter (please check one or both options below) : Events,Newsletter
Comma separated just like the $field_20_opts variable is assigned.