You are here: Re: Little Problem with php Checkboxes « All PHP « IT news, forums, messages
Re: Little Problem with php Checkboxes

Posted by Simon on 03/09/06 00:44

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="cravfuk" value="caravan"> Caravan <input
> type="checkbox"name="check[]" value="camper"> Camper

"Arjan" <arjan.de.vrieze@nospam.zeelandnet.nl> wrote in message
news:440f102d$0$2152$6c4159fb@news.tweaknews.nl...
> 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";
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация