<?php 
    require_once 'config/conexao.class.php';
    require_once 'config/crud.class.php';
    $con = new conexao(); // instancia classe de conxao
    $con->connect(); // abre conexao com o banco

$id = $_POST["id"];

if( $id == 0 ){
echo "<option value=''>Select Server&nbsp;&nbsp;</option>";
} else if ($id <> ''){ ?>
<?php
$subs = mysql_query("SELECT * FROM packages WHERE server = '$id' order by id DESC");
$total = mysql_num_rows($subs);
while($sub = mysql_fetch_array($subs)){ 

?>
<option value="<?php echo $sub['name']; ?>"><?php echo $sub['name']; ?>&nbsp;&nbsp;</option>

<?php }} ?>
	
