1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <?php
require_once 'db.class.php';
$host='localhost';
$uid='root';
$pass='';
$table='siteweb';
$database= new db($host,$uid,$pass,$table);
if(isset($_POST['submit'])){
$besoin=$_POST['besoin'];
$taille=$_POST['taille'];
$cahier=$_POST['cahier'];
$video=$_POST['video'];
$photo=$_POST['photo'];
$civilite=$_POST['civilite'];
$nom=$_POST['nom'];
$type=$_POST['type'];
$secteur=$_POST['secteur'];
$fixe=$_POST['fixe'];
$mobile=$_POST['mobile'];
$Email=$_POST['Email'];
$ville=$_POST['ville'];
$pays=$_POST['pays'];
$description=$_POST['description'];
$champs=array('besoin','taille','cahier','video','photo','civilite','nom','type','secteur','fixe','mobile','Email','ville','pays','description');
$valeurs=array($besoin,$taille,$cahier,$video,$photo,$civilite,$nom,$type,$secteur,$fixe,$mobile,$Email,$ville,$pays,$description);
$data='devis';
$database->insert($champs,$valeurs,$data);
if($besoin&&$taille&&$cahier&&$video&&$photo&&$civilite&&$nom&&$type&&$secteur&&$fixe&&$mobile&&$Email&&$ville&&$pays&&$description){
echo header('Location: reponse.php');
}else echo "<div class=p>veuillez saisir tout les champs</div>";
}
?> |
Partager