(Newbie) how to evaluate a varying number of db generated checkboxes?

From: Date: Wed, 07 Mar 2001 17:00:43 +0000
Subject: (Newbie) how to evaluate a varying number of db generated checkboxes?
Groups: php.db 
Request: Send a blank email to php-db+get-7160@lists.php.net to get a copy of this message
I'm generating a html form with php and a MySQL database. My code generates a varying number of checkboxes depending on the number of 'options' in my database. The name of the checkbox is set to the -id- of the 'option' in my database. When the generated form is posted I want to show a page showing a overview of the 'options' checked. But how do I check if that varying number of checkboxes is 'checked' ?? db connect and query, result of query is placed in: $result ............. while($row=mysql_fetch_array($result)) { print("<form method=\"post\" action=\"formhandler.php\">"); $optionID=$row["id"]; $optionDescription=$row["description"]; print("<input type=\"checkbox\" name=\"$optionID\"> $optionDescription<br>\n"); print("</form>"); } But how can I get this 'unknown' number of checkboxes in my next page and evaluate if they are checked so I can leave out the unchecked ones in my overview. Who can help me with this problem?! Thanx! H. de Visser

« previous php.db (#7160) next »