Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

display multiple ID values from one url

$
0
0

I'm working on an application that prints a fields from rows of a MySQL database.  There is a checkbox next to each row.  For each checkbox selected, it sends the unique row ID to the next page in the format  display.php?checked=111&checked=222&checked=333

 

Of course, if I use

$query="SELECT * FROM list WHERE id = $checked";

then it obviously only displays the first one (in the above example, row with ID 111)

 

What is the best way to accomplish this?  Do I need to totally re-think how I'm doing this, or is there away to allow $checked to have multiple values and get all of those values from the DB?

 

 


Viewing all articles
Browse latest Browse all 13200

Trending Articles