my code is
<html>
<head>
<body>
<div style="width:400px;height:300px;border:1px solid blue;">
<div style="width:400px;height:50px; float: left;"> </div>
<form>
<div align="right" style="width:150px;height:30px; float: left;">Show Name : </div>
<div style="width:250px;height:30px; float: left;">
<select name="show_name" onchange="showUser(this.value)">
<option selected="selected"> -- Select The Show --</option>
<?php
session_start();
include_once('db.php');
$sql = mysql_query("SELECT show_id, show_name FROM show_name");
while($row=mysql_fetch_array($sql))
{
$show_id = $row['show_id'];
$show_name= $row['show_name'];
echo "<option value ='.$show_id'>$show_name</option>";
}
?>
</select>
</div>
<div align="right" style="width:150px;height:30px; float: left;">Show Place : </div>
<div style="width:250px;height:30px; float: left;">
<select name="show_place" onchange="showUser(this.value)">
<option selected="selected"> -- Select The Show Place --</option>
<?php
$sql = mysql_query("SELECT * FROM show_name, show_place WHERE show_name.show_id=show_place.show_id");
while($row=mysql_fetch_array($sql))
{
$show_id = $row['show_id'];
$show_place = $row['show_place'];
echo "<option value ='.$show_id'>$show_place</option>";
}
?>
</select>
</div>
</form>
</div>
</body>
</head>
</html>
i want to option box condition for stud show to select the particular place .. please guide me how to merge the two table by using if condition or foreach condition