PHP MySQL - foreach loop with if to display subset list within key list -
I'm trying to display the records of locations, with a list of rooms within each unique record. I have two tables, a place_view table and a place_view table. Using a slow example, I am struggling to populate each site with those rooms which are contained within. I am able to revoke the rooms in the room, but I am struggling to limit the room to be displayed only with my unique guardian site. . There is something simple that I do not see, I just know this
// Site W place ROOMS ARRAY test 2 $ selCity = $ _GET ['theOption']; // per comment below $ $ _POST to modify $ _GET $ result5 = mysql_query ("select * from lookup_venue_room interiors include lookup_venue_room.venue_name on lookup_venue = lookup_venue.venue_name where lookup_venue.name = '$ selCity' and lookup_venue.venue_name = Lookup_venue_room.venue_name ") or die ('error'. Mysql_error ()); $ RoomNames = array (); $ PlaceNames = array (); While ($ line2 = mysql_fetch_array ($ result5)) {$ roomNames [] = $ line2 [[venue_room_name ']; $ Place name [] = $ line 2 ['place_name']; } $ Result6 = mysql_query ("choose from lookup_venue * where lookup_venue.venue_city = '$ selCity'") or die ('error:' mysql_error ().); While ($ line = mysql_fetch_array ($ result6)) {echo '& lt; H3 & gt; ' . $ Line ['venue_name']; Echo '& lt; Select name = "room"> gt; $ PlaceNameOrig = $ line ['location_name']; Foreach (name as $ roomNames $ nameName) {if ($ line2 ['location_name'] == $ placeNameOrig) {echo '
Comments
Post a Comment