/home/bjcompany/domains/benjabhorn.com/public_html/BJconcrete/control/get_port_SubCate.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php        header("Content-Type: text/plain; charset=utf-8");
            
header("Cache-Control: no-cache,must-revalidate");
            
header("Prdgma : no-cache");
            include(
'config.inc.php');
            
//-----------------------------------------------------------
            
$link mysql_connect($cfgServers['host'],$cfgServers['stduser'],$cfgServers['stdpass'])or die("Can't connect Server");
            
mysql_select_db($cfgServers['selectdb']) or die("Can't connect databases");
            
//----------------------------------------------------------
            
$query="SELECT * FROM tbl_portfolio_category WHERE mainCateId     ='".$_POST['MainCateID']."' ";
            
$result=mysql_query($query);
?>
        <select name="subCateID" >
         <option value=''>-----</option>
          <?php while($data=mysql_fetch_assoc($result)){?>
          <option value="<?php echo $data['id']?><?php if($data['id']==$_POST['SubCate']){ echo "selected";}?>><?php echo $data['cate_name']?></option>
          <?php ?>
        </select>

<?php mysql_close();?>