1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| if((!empty($emet) AND !preg_match("#^( *)$#", $emet)) ||
(!empty($proposition) AND !preg_match("#^( *)$#", $proposition)) ||
(!empty($type_proposition) AND !preg_match("#^( *)$#", $type_proposition)) ||
(!empty($date_emission) AND !preg_match("#^( *)$#", $date_emission)) ||
(!empty($etat) AND !preg_match("#^( *)$#", $etat)) ||
(!empty($remarque) AND !preg_match("#^( *)$#", $remarque)) ||
(!empty($montant) AND !preg_match("#^( *)$#", $montant)) ||
(!empty($marge) AND !preg_match("#^( *)$#", $marge)))
{
$query = "INSERT INTO $table VALUES ('', '$proposition', '$etat', '$remarque', '$date_emission', '$date_validité', '$montant', '$marge', '$id', '$emet', '$type_proposition')";
mysql_query($query)or die(mysql_error());
header("location: affairepdf.php?id=".$id);
exit;
}
else
{
echo " Il y a un champ vide, veuillez le remplir !!";
} |
Partager