Hello,
I have passed an array of checkbox values to a results page and verified they exist by echoing them. I would like to use the values from the checkboxes to form a query in MySQL. I can make queries, but I have not figured out how to use variables in an array.
The checkboxes represent data input in a table. I was looking to return the instances of the checked items and all the data in the row. I know it should be a WHERE statement.
Here is the checkbox array:
$sensors = $_POST['SensorList'];
Would I incorporate this into the SQL Statement:
foreach ($sensors as $loop ){
echo $loop.", ";
}
I do not think I would use "ECHO", but I need a push in the right direction.
Any help would be great.