I have a database with articles from which I can make a selection of which
articles to show. This selection is made by a form with checkboxes.
In the mysql table is a field called "pr". If there's a "1" in this field,
the article should be shown for print, if there's a "0", it shouldn't.
In the code I generate a form with all the titles and checkboxes. The
checkbox values are the id's from the titles.
When I click the button, I want to see my selection.
The problem is this: What sql query can be used to proces the information
from the checkboxes? At the moment I use in order to change the values in
the database according to the checkbox selections:

$query = mysql_query("UPDATE articles SET pr='1' WHERE id='$p[id]'");

But it does nothing! How can I insert multiple values (from the checkbox
array) at one time in a database?


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to