You are here: Re: Question about passing multiple checkbox variables in form to display in e-mail « PHP Programming Language « IT news, forums, messages
Re: Question about passing multiple checkbox variables in form to display in e-mail

Posted by Michael Fesser on 12/04/07 22:28

..oO(ATDave)

>On Dec 4, 5:00 pm, Michael Fesser <neti...@gmx.de> wrote:
>>
>> For a really simple array print use either print_r() or var_dump(). For
>> a more sophisticated result you would have to loop through the array and
>> print out the values yourself in the way you like.
>
>Thanks for the quick response. I don't know how to write the code for
>an array, but I did try a couple things based on some
>searching...unfortunately they did not work.

It would help to post some code and say what did not work.

>I would assume I have to
>do a loop through the array to print out the values...but should those
>get assigned to more variables (one for each option) so that I can
>actually pass them through in the e-mail?

No variables needed, just a simple foreach loop and a little sanity
check. Something like:

if (isset($_POST['SelfDevelopmentInterest']) &&
is_array($_POST['SelfDevelopmentInterest'])) {
foreach ($_POST['SelfDevelopmentInterest'] as $value) {
// print out your stuff the way you like
print $value;
...
}
}

Micha

 

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

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