Forum Moderators: coopster
<select name="company" id="company" onChange="callAjax(this.value, '<?=$id?>');">
$query="SELECT * FROM listedcomp WHERE date='". $getdaterows[0] ."' ORDER BY company ;";
$result = mysql_query($query);
if (!$result) {
echo mysql_erorr();
}
$num = mysql_numrows($result);
for ($i = 0; $i < $num;) {
$row = mysql_fetch_assoc($result);
$id = $row['id'];
?>
<option value="<?=$row['company'];?>"><? echo $row['company'];?></option>
<? $i++; }
The function callAjax has $id as one of its arguments....but $id is declared after tht....I want it to have the value of the id of the company tht the user selects...is this possible?
?>
[edited by: eelixduppy at 4:39 pm (utc) on Sep. 30, 2007]