Aggiunta associazione

This commit is contained in:
2019-04-29 16:51:42 +02:00
parent 391a850339
commit 6d18fd19ae
33 changed files with 2987 additions and 1 deletions

30
associazione/cercamat.php Normal file
View 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;
?>