hey guys, i have this code here, all the rows of my table, news, are queried and displayed in a select box, ditopic, using arrays.. what i want is after a user selects something from the select box, some other information from the same row is displayed in a textarea right below the select box without having to hit any submit buttons etc.. is this possible?
maybe seeing the code may help
if ($status == 'delete') {
$query = mysql_query("SELECT * FROM news ORDER BY id");
$numrows = mysql_num_rows($query);
if(empty($numrows)) {
echo "no rows";
}else{
echo "<form name='deletenews' method='post'>";
echo "<table width='350' cellpadding='0' cellspacing='0' bgcolor='#AAAAAA' align='left'>";
echo "<tr valign='top'>";
echo "<td width='100'>";
echo "<table width='350' cellpadding='3' cellspacing='1' align='left'>";
echo "<tr>";
echo "<td width='100' bgcolor='#EEEEEE'>";
echo "Topic";
echo "</td><td width='250' bgcolor='#EEEEEE'>";
echo "<select name='ditopic'>";
while($deletearray = mysql_fetch_array($query)) {
echo "<option value='".$deletearray[id]."'>".$deletearray[topic];
}
echo "</td></tr>";
echo "<tr>";
echo "<td width='100' bgcolor='#EEEEEE'>";
echo "Message";
echo "</td><td width='250' bgcolor='#EEEEEE'>";
echo "<textarea rows='7' cols='40' name='dimessage'></textarea></td></tr>";
echo "</table></form>";
}
}