Aggiunta associazione
This commit is contained in:
30
associazione/cercamat.php
Normal file
30
associazione/cercamat.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
include_once ("../core/config.php");
|
||||
include_once ("funzioni.php");
|
||||
|
||||
$articolo = $_GET['articolo'];
|
||||
|
||||
$query = "SELECT vendita, taglie FROM wf_materiale WHERE id = $articolo";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
|
||||
$dato = mysql_fetch_array ( $res );
|
||||
$art = $dato['vendita'];
|
||||
|
||||
|
||||
$dato = $dato['taglie'];
|
||||
if (str_replace(' ', '', $dato) != "" ) {
|
||||
$taglie = explode (" ", $dato);
|
||||
$tag='<option>SELEZIONARE</option>';
|
||||
foreach ($taglie as &$taglia) {
|
||||
$tag.='<option value="'.$taglia.'">'.$taglia.'</option>';
|
||||
}
|
||||
} else {
|
||||
$tag='<option>N/D</option>';
|
||||
}
|
||||
|
||||
$v_result = array('status'=>'OK', 'art'=>$art, 'tag'=>$tag);
|
||||
|
||||
$json = json_encode($v_result);
|
||||
echo $json;
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user