> I am passing a value of checkboxes in a form to a new page like this
> example here: http://www.gibsonusa.com/test/check/)
> In a new page how can I pull the data from a MySQL database according
> each value I passed from a previous page? In other words: Assume that
> value of a checkbox equal to the ID of the record in a database. The
> of checkbox 1 (for example) is 12345 and the value of checkbox2 is
> After passing those values to a new page how can I pull the rest of
> information from a database for those values?

$IDs = implode(",",$_GET['chk']);

$Result = MySQL_query("SELECT * FROM your_table WHERE ID IN ($IDs)");

That's assuming your chk[] values in the database are an integer or
float type. If they are string, then use:

$IDs = "'" . implode("','",$_GET['chk']) . "'";

---John Holmes...

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to