real_escape_string(str_replace(' ','',$_POST['cp'])); $civic = $sql->real_escape_string($_POST['civic']); $q_fibre = "SELECT * FROM `fibre` WHERE `zip` = '$zip' AND `terrain` = '$civic'"; $res_fibre = $sql->query($q_fibre); $fibre_find = 0; $fibre_result = ''; if($res_fibre->num_rows > 0){ $fibre_result .= "Addresse disponible (UN option DOIT être selectionné):

"; while($row_fibre = $res_fibre->fetch_array()){ $opt_input = ""; $tr = "onclick='fibre_sel({$row_fibre['id']})'"; if($row_fibre['sn'] != ''){ $opt_input = ""; $tr = "title='Sn déja atrtibué pour cette adresse'"; } $boitier = ($row_fibre['boitier_pas_install'] == 1) ? "Boitier non installé, ajouter 2 semaines de délais" : ''; $fibre_result .= ""; } $fibre_result .= "
$opt_input{$row_fibre['terrain']}{$row_fibre['rue']}{$row_fibre['ville']}{$row_fibre['zip']}{$row_fibre['description']}$boitier
"; } else $fibre_result = "
Aucune adresse trouvée. Non disponible.
"; echo $fibre_result; } ?>