You are here: Re: $_POST « All PHP « IT news, forums, messages
Re: $_POST

Posted by Martin Jay on 04/24/06 16:02

In message <1145878532.101141.5090@e56g2000cwe.googlegroups.com>,
wesley@ispace.co.za writes
>I have tried that also. But the problem is that the value of the
>variable gets created dynamically.
>The problem is that i have an unlimited number of checkboxes on one
>page. So i am using an array to name them. I want to retriev the values
>from the checkboxes using another script. But, i cannot seem to
>retrieve these values.

Presumably you mean your HTML code contains code similar to this for
each checkbox:

<input type="checkbox" name="delete[]" value="1">
<input type="checkbox" name="delete[]" value="2">
<input type="checkbox" name="delete[]" value="3">
etc

After your form has been posted 'delete' is an array and can be used in
the following way:

$_POST['delete'][0];

this will contain the 'value' of he first checkbox that was ticked.

$_POST['delete'][1];

will contain the 'value' of the second checkbox that was ticked.
--
Martin Jay

 

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

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