Reply to Re: reading variables?

Your name:


Posted by David Dorward on 01/20/06 10:18

William Stokes wrote:

> For each printed document there's a check box "Delete" for
> marking that document for deletion. The document info from DB is printed
> using 'while' loop. The only problem I have is that I don't know how to
> handle/read the Delete checkbox values because the checkbox name is
> different for each file. Checkboxes are printed whit this line:"echo "<td
> colspan=\"5\"><input type=\"checkbox\" name=\"del_$id\">Delete</td>";"

Well, it is possible to look at all the fields which match the regular
expression /del_[0-9]+/, but you would probably be better off just doing
something like this:

<input type='checkbox' name='del[]' value='$id' id='del_$id'>
<label for='del_$id'>Delete</label></td>

And then accessing the $_POST['del'][] array that PHP will represent that

David Dorward <> <>
Home is where the ~/.bashrc is

[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

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