Re: Little Problem with php Checkboxes



You need to make each name unique
<input type="checkbox" name="tent" value="tent"> Tent <input
type="checkbox"name="vouwwagen" value="vouwwagen">Vouwwagen
<input type="checkbox" name="crav***" value="caravan"> Caravan <input
type="checkbox"name="check[]" value="camper"> Camper

"Arjan" <arjan.de.vrieze@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:440f102d$0$2152$6c4159fb@xxxxxxxxxxxxxxxxxxxx
Hello,
First i want to tell i'm a newbie with php.
I have a little problem and that's the following. My checkboxes are
working,
but when i will use the mailer, only the last checked checkbox will send
to
mail.
The others not.

I read on the internet that i must give it an ID. But i don't know how.
And
how must i change my mailer.php and config.php.

What i want is the following.
First there is a question how the people want to stay at our camping.
Then there is a question of they will move with there camper or something.

When i fill in the full form, then te form will be send to me.
In the mail there is only the latest checkbox from te second question.

I hope that someone can help me.
Greetings


I will send a sample of the scripts.

**** QUESTION FORM ****
<td>Wij willen graag een kampeerplaats reserveren voor een: </td>
<td>
<input type="checkbox" name="check[]" value="tent"> Tent <input
type="checkbox"name="check[]" value="vouwwagen">Vouwwagen
<input type="checkbox" name="check[]" value="caravan"> Caravan <input
type="checkbox"name="check[]" value="camper"> Camper
<td></td>
</td>
</tr>
<td>Wij willen graag een overnachtingsplaats reserver voor:
(deze plaatsen zijn voor gasten die overdag met hun kampeermiddel willen
uitrijden?)
</td>
<td>
<input type="checkbox" name="check[]" value="caravan uitrijden"> Caravan
uitrijden <input type="checkbox" name="check[]" value="Camper uitrijden">
camper uitrijden

*** MAILER FORM*****
foreach($_POST['check'] as $value);

*** CONFIG FORM *****
$message .= "Kampeermiddel:".$value." \n";




.