Calcul de solde
Fermé
binousha_1022
Messages postés
41
Date d'inscription
mercredi 11 décembre 2019
Statut
Membre
Dernière intervention
25 juin 2020
-
11 déc. 2019 à 11:56
yg_be Messages postés 22575 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 19 mars 2024 - 13 déc. 2019 à 17:56
yg_be Messages postés 22575 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 19 mars 2024 - 13 déc. 2019 à 17:56
A voir également:
- Calcul de solde
- Calcul moyenne excel - Guide
- Formule de calcul excel - Guide
- Solde steam 2023 - Guide
- Logiciel calcul plancher bois gratuit - Télécharger - Architecture & Déco
- Solde lycamobile - Forum Mobile
2 réponses
yg_be
Messages postés
22575
Date d'inscription
lundi 9 juin 2008
Statut
Contributeur
Dernière intervention
19 mars 2024
1 458
11 déc. 2019 à 12:09
11 déc. 2019 à 12:09
bonjour, as-tu une question?.
binousha_1022
Messages postés
41
Date d'inscription
mercredi 11 décembre 2019
Statut
Membre
Dernière intervention
25 juin 2020
Modifié le 13 déc. 2019 à 16:56
Modifié le 13 déc. 2019 à 16:56
Non mon problème ne s'est pas résolu.
Merci
Merci
yg_be
Messages postés
22575
Date d'inscription
lundi 9 juin 2008
Statut
Contributeur
Dernière intervention
19 mars 2024
1 458
13 déc. 2019 à 17:56
13 déc. 2019 à 17:56
as-tu une question?
11 déc. 2019 à 12:26
11 déc. 2019 à 12:45
11 déc. 2019 à 12:56
<html>
<head>
<link rel="icon" type="image/png" href="logo.bmp" />
<meta charset="utf-8"/>
<link rel="stylesheet" href="inscription.css"/>
</head>
<h1>Enrer une nouvelle commande</h1>
<form action="commande.php" method="post">
<div class="c100">
<label for="agence">Agence : </label>
<input type="varchar" id="agence" name="agence">
</div>
<div class="c100">
<label for="nomagent">Nom de l'agent : </label>
<input type="varchar" id="nomagent" name="nomagent">
</div>
<div class="c100">
<label for="datecommande">Date commande : </label>
<input type="date" id="datecommande" name="datecommande">
</div>
<div class="c100">
<label for="numerocompte">N° Compte Client : </label>
<input type="varchar" id="numerocompte" name="numerocompte">
</div>
<div class="c100">
<label for="prenom">Prenom : </label>
<input type="varchar" id="prenom" name="prenom">
</div>
<div class="c100">
<label for="nom">Nom : </label>
<input type="varchar" id="nom" name="nom">
</div>
<div class="c100">
Monture
<input type="radio" name="monture" value="oui" id="oui" checked="checked" /> <label for="oui">Oui</label>
<input type="radio" name="monture" value="non" id="non" /> <label for="non">Non</label>
</div>
<div class="c100">
<label for="montant">Montant : </label>
<input type="float" id="montant" name="montant">
</div>
<div class="c100">
<label for="acompte">Acompte : </label>
<input type="float" id="acompte" name="acompte">
</div>
<div class="c100">
<label for="datenvoie">Date Envoie : </label>
<input type="date" id="datenvoie" name="datenvoie">
</div>
<div class="c100">
<input type="checkbox" id="statut" name="statut" value="envoie">
<label for="statut">Envoie</label>
</div>
<div class="c100" id="submit">
<input type="submit" value="Envoyer">
</div>
</form>
</html>
code php:
<?php
$serveur = "localhost";
$dbname = "suivicommande";
$user = "root";
$pass = "";
$agence = $_POST["agence"];
$nomagent = $_POST["nomagent"];
$datecommande = $_POST["datecommande"];
$numerocompte = $_POST["numerocompte"];
$prenom = $_POST["prenom"];
$nom = $_POST["nom"];
$monture = $_POST["monture"];
$montant = $_POST["montant"];
$acompte = $_POST["acompte"];
$datenvoie = $_POST["datenvoie"];
$statut = $_POST["statut"];
/*$date_reception_log = $_POST["date_reception_log"];
$date_livraison_client = $_POST["date_livraison_client"];*/
try{
//On se connecte à la BDD
$dbco = new PDO("mysql:host=$serveur;dbname=$dbname",$user,'');
$dbco->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//On insère les données reçues
$sth = $dbco->prepare("
INSERT INTO commande(datecommande, numerocompte, prenom, nom, monture, montant, acompte, datenvoie, statut, agence, nomagent)
VALUES(:datecommande, :numerocompte, :prenom, :nom, :monture, :montant, :acompte, :datenvoie, :statut, :agence, :nomagent)");
$sth->bindParam(':datecommande',$datecommande);
$sth->bindParam(':numerocompte',$numerocompte);
$sth->bindParam(':prenom',$prenom);
$sth->bindParam(':nom',$nom);
$sth->bindParam(':monture',$monture);
$sth->bindParam(':montant',$montant);
$sth->bindParam(':acompte',$acompte);
$sth->bindParam(':datenvoie',$datenvoie);
$sth->bindParam(':statut',$statut);
$sth->bindParam(':agence',$agence);
$sth->bindParam(':nomagent',$nomagent);
/*$sth->bindParam(':date_reception_log','');
$sth->bindParam(':date_livraison_client','');*/
$sth->execute();
//On renvoie l'utilisateur vers la page de remerciement
header("Location:choixaction.html");
}
catch(PDOException $e){
echo 'Impossible de traiter les données. Erreur : '.$e->getMessage();
}
?>
11 déc. 2019 à 14:04
tout cela fonctionne-t'il bien?
11 déc. 2019 à 16:00