Files
pannello/associazione/cercaart.php
2019-04-29 16:51:42 +02:00

22 lines
571 B
PHP

<?php
include_once ("../core/config.php");
include_once ("funzioni.php");
$produttore = $_GET['produttore'];
$categoria = $_GET['categoria'];
$query = "SELECT id, nome FROM wf_materiale WHERE categoria = '$categoria' AND produttore = '$produttore' AND attivo = 1 ORDER BY nome";
$res = mysql_query( $query, $DB_ID );
$mat='<option>SELEZIONARE</option>';
while ($dato = mysql_fetch_array ( $res )) {
$mat.='<option value="'.$dato['id'].'">'.$dato['nome'].'</option>';
}
$v_result = array('status'=>'OK', 'mat'=>$mat);
$json = json_encode($v_result);
echo $json;
?>