Reply to Re: [PHP] PHP Printing Error Help

Your name:

Reply:


Posted by John Nichel on 08/15/05 19:58

Chirantan Ghosh wrote:
> Ho John,
>
> I put each check box with name & tried to get the values as I get of
> Name, etc.
> Somehow it didn't send that info so, now I tried to get the info of the
> whole TABLE named "InterestedNumber"(which contains all check boxes)
>
> <?
> //////after all codes////
> $mailBody .= "Full Name: $name\n";
> ...
> $mailBody .= "Company Info: $Company Info\n";
> $mailBody .= "Interested Numbers: $InterestedNumber\n";
> $mailBody .= "Interested Area: $InterestedArea\n";
> $mailBody .= "Comments: $comments\n\n\n";
> $mailBody .= "$todaytime";
>
> /////// THIS is where I put in the check box////
>
> How ever the main problem for me is "Interested Numbers:
> $InterestedNumber\n"; part where I have no clue what "\n" stands for OR
> why is it repeated in the "Comments" section.
>
> The page is http://www.primarywave.com/BrokerOutpost_Contact.htm you
> can see the source code if you like.
>
> Thanks a lot for the input,
> C

The "\n" is just a new line.

Your checkboxes are all named things like "1-877-HOMECASH" and
"1-877-APPLY NOW", so '$InterestedNumber' isn't going to have any of
their values.

You probably want to move into the relm of array's. For each one of
your checkboxes, you can do this...

<input type="checkbox" name="InterestedNumber[]" value="1-877-HOMECASH">
<input type="checkbox" name="InterestedNumber[]" value="1-877-APPLY NOW">

So on, and so forth. By naming them in this way, it will pass the value
to your form processor as a numerical array of all the selected items.
When you want to process it, just loop thru the array.

http://us2.php.net/manual/en/language.types.array.php

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@kegworks.com

[Back to original 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

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