I have an input form which includes a list box where multiple items can be selected:
<select name="MultiRoomSelect[]" id="MultiRoomSelect" multiple="multiple">
I am trying to read the content of $_POST['MultiRoomSelect']
and use the result to look up records in a table.
For testing the result of MultiRoomSelect[]
is "2,3,4"
which are the correct ID's for the record(s) lookup I want to execute.
The lookup query I have is
SELECT RecordID, RoomID FROM Jafa WHERE RoomID =
It's the = part I am very unsure about, how can I use the result of the MultiRoomSelect[]
to populate a variable I can use in the query like:
SELECT RecordID, RoomID FROM Jafa WHERE RoomID = $value //MultiRoomSelect[]
and keep looping until the array has read all three array values.
I hope I have written this clearly. Many thanks in advance.