Hi frnds..
i want to daisplay values in listbox from database table regarding selected item in first listbox?
here i copied the code...in this i got values of first listbox frm db table..after i want 2nd listbox values from db table of 1st selected item..
plz help ma asap...
i am eagarly waiting 4 reply..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="100%" height="208" border="0">
<tr>
<th width="87%" height="21" scope="col">
<div align="right">
<table width="60%" border="0">
<tr>
<th width="34%" scope="col"><div align="right"><a href="addcourses.php">Add Courses</a></div></th>
<th width="40%" scope="col"><div align="right"><a href="addsubcourses.php">Add Sub Courses</a></div></th>
<th width="26%" scope="col"><div align="right">Add Content</div></th>
</tr>
</table>
</div></th>
<th width="13%" scope="col"><a href="logout.php">Logout</a></th>
</tr>
<tr>
<td>
<form name="form" method="post" action="content.php">
<table width="100%" height="118" border="0">
<tr>
<td><div align="right"><strong>Course</strong></div></td>
<td><div align="center"><strong>:</strong></div></td>
<td><select name="cname" id="select" >
<?php
include("config.php");
$ress=mysql_query("select cname from addcourse ") or die(mysql_error());
while ($row = mysql_fetch_array($ress)) {
?>
<option value="<?php echo $row['cname']; ?> " > <?php echo $row['cname']; ?></option>
<?php
}
?>
</select></td>
</tr>
<tr>
<th width="57%" scope="col"><div align="right">Sub Course </div></th>
<th width="8%" scope="col">:</th>
<th width="35%" scope="col" align="left">
[B]<select name="subcname" id="">
<?php
include("config.php");
$result=mysql_query("select subcname from subcourse ") or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
?>
<option value="<?php echo $row['subcname']; ?> " > <?php echo $row['subcname']; ?></option>
<?php
}
?>[/B]
</select></th>
</tr>
<tr>
<td><div align="right"><strong>Content</strong></div></td>
<td><div align="center"><strong>:</strong></div></td>
<td><textarea name="content" id="textfield2" rows="5" cols="30"></textarea></td>
</tr>
<tr>
<td>
<div align="right">
<input type="submit" name="button" id="button" value="Add Content" />
</div></td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</td>
<td> </td>
</tr>
</table>
</body>
</html>
Thanks in advance...