Query regarding List/Combo Boxes and additional fields into text fields?
I've currently got a webpage that runs a query in my database using variables from the URL to populate a list box. The query brings back a list of locations:
The actual query does a Select location, block, area, status when it runs:
$selectloc = new WA_MySQLi_RS("selectloc",$DB,0);
$selectloc->setQuery("SELECT location, block, area, status FROM building WHERE country = ?");
$selectloc->bindParam("s", "".$_GET['country'] ."", "empty");
It then put the values for location into the list box which is a repeat to get all the options:
$wa_startindex = 0;
$wa_startindex = $selectloc->Index;
<option value="<?php echo ($selectloc->getColumnVal("Location")) ?>"></option>
What I was trying to do now, since I've been asked, is when the Location is selected, I push the other information, from the other 3 columns (block, area, status) into 3 text boxes on the same page, so if you select Location 1 for example, the text box for block would get filled in with the additional column data for location 1. If you change this to Location 2 it would update them to show the additional column data for location 2 etc.
I've seen lots of different scripts etc but I'm getting totally lost in what I need to do and how to do it with the setup I have and wondered if there was any help or guidance you could give me??