Advertisement
Advertisement
| 08.29.2008 at 11:57AM PDT, ID: 23689785 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: |
if(isset($_POST['button']))
{
$a=$_POST['model'];
echo $a;
for($i=0;$i<sizeof($a);$i++)
{ echo $a[$i]." "; }
}
?>
<form name="form1" method="post" action="123.php">
<input type="submit" name="button" id="button" value="Submit">
</label>
<p> </p>
<p>
<select name="make" id="make" onChange="javascript:form.submit()">
<option value="0" selected>Any</option>
<?php
$res_getmake = mysql_query("select name from resumecat");
//echo mysql_num_rows($res_getmake) ;
if(mysql_num_rows($res_getmake)!=0)
{
while($makerow=mysql_fetch_array($res_getmake))
{
echo $makerow['name'];
echo "<option value='".trim($makerow['name'])."' ";if ($_POST['make']==$makerow['name']) {echo "selected=\"selected\"";}echo ">".trim($makerow['name'])."</option>";
}// of while $hintrow
}
?>
</select>
<select name="model" size="5" multiple="multiple">
<option value="0" selected>Any</option>
<?php
$res_getmake = mysql_query("select id from resumecat where name='".$_POST['make']."'");
$id=mysql_fetch_array($res_getmake);
$res_getmodel=mysql_query("SELECT * FROM resumesubcat where catid ='".$id['id']."' ORDER BY subcat ASC") or die(mysql_error()." at line 120");
if(mysql_num_rows($res_getmodel)!=0)
{
while($modelrow=mysql_fetch_array($res_getmodel))
{
echo "<option value='".trim($modelrow['subcat'])."' ";if ($_POST['model']==$modelrow['subcat']) {echo "selected=\"selected\"";}echo ">".trim($modelrow['subcat'])."</option>";
}// of while $hintrow
}
?>
</select>
</p>
<p> </p>
</form>
|