You are here: Re: Using check box in table to select records « All PHP « IT news, forums, messages
Re: Using check box in table to select records

Posted by Dikkie Dik on 10/07/05 09:33

In the example Jeffrey gave, the name ends in [].
This would automatically cause an array to be created. As checkboxes are
only passed back to the server when they are set, you should end up with
an array of checked items on the server. You can use the implode
function to convert it to a comma separated list if you want to.

Best regards

Ian Davies wrote:
> Thanks for your reply
>
> Looking at your code and reading the article it seems that some sort of
> array is created. How would I then APPEND this list to a table, Im OK with
> the SQL but which part of the php script would be used in the APPEND
> statement.
> or alternatively how could I use the array as a WHERE clause in a SELECT
> statement.
>
> Ian
>
> "JDS" <jeffrey@example.invalid> wrote in message
> news:pan.2005.10.04.17.17.09.812634@example.invalid...
>
>>On Tue, 04 Oct 2005 16:49:37 +0000, Ian Davies wrote:
>>
>>
>>> <input type="checkbox" name="checkbox" value="checkbox">
>>
>>Use
>>
>>name="checkbox[]"
>>
>>and
>>
>>value="<? echo $TypeID?>"
>>
>>Read the following:
>>http://us2.php.net/manual/en/faq.html.php#faq.html.arrays
>>
>>ask more questions when you get stuck
>>
>>later...
>>
>>--
>> JDS | jeffrey@example.invalid
>> | http://www.newtnotes.com
>> DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
>>
>
>
>

 

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

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