Jump to content

Passing multiple form checkbox values to the next page


mjurmann

Recommended Posts

Hello, I'm trying to pass multiple checkbox values from a form to the next page (a mail script). Even when multiple checkboxes are selected, the e-mail sent out via the script on the form action's destination page only includes the last checked item. How can I include all of the checkbox values?

 

Here is the code I was using on the mail script page:

 

<?php if (is_array($_POST['program'])){
$TrainingProgram = implode(', ', $_POST['program']);} 
else {
$TrainingProgram = $_POST['program']; }?>

 

Thanks so much.

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.