Ok, I have a database:
ie…
Id | cab | price | w1
1 | wall | $300 | $19
on my form I have three textboxes:
input1 is [B]cab[B]price[B]w1
The way I have it now works great, I type a few letters in input1, it pulls up a list, once cab is selected it populates input1 with [B]cab[B]price
[I]I want to know once cab is selected, if it can populate input2 with [B]price[B]w1
Im using the script from here:
[url]http://www.dhtmlgoodies.com/index.html?whichScript=ajax-dynamic-list
This is the php code for accessing the DB
[code=php]<?
$conn = mysql_connect(“localhost”,”x”,”x”);
mysql_select_db(“x”,$conn);
if(isset($_GET[‘getCabinetsByLetters’]) && isset($_GET[‘letters’])){
$letters = $_GET[‘letters’];
$letters = preg_replace(“/[^a-z0-9 ]/si”,””,$letters);
$res = mysql_query(“select * from cabinets where cab like ‘”.$letters.”%'”) or die(mysql_error());
#echo “1###select * from cabinets where cab like ‘”.$letters.”%’|”;
while($inf = mysql_fetch_assoc($res))
{
echo = $inf[“price”].”###”.$inf[“cab”].”|”;
}
}
?>
Any help, much appreciated!!