par
dunbar » 01 sept. 2006, 23:45
Bon alors voilà mon code
$prestation_tvc = array_map('addslashes', $_POST);
$prestation_tvc = Array('ref[1]', 'nom_client[1]', 'adr[1]', 'postal[1]', 'commune[1]', 'technicien[1]','ha[1]','hd[1]', 'tel[1]', 'installation[1]','com[1]','ref[2]', 'nom_client[2]', 'adr[2]', 'postal[2]', 'commune[2]', 'technicien[2]','ha[2]','hd[2]', 'tel[2]', 'installation[2]','com[2]',
'ref[3]', 'nom_client[3]', 'adr[3]', 'postal[3]', 'commune[3]', 'technicien[3]','ha[3]','hd[3]', 'tel[3]', 'installation[3]','com[3]');
print_r($_POST["ref"]);
print_r($_POST["nom_client"]);
print_r($_POST["adr"]);
print_r($_POST["postal"]);
print_r($_POST["commune"]);
print_r($_POST["technicien"]);
print_r($_POST["ha"]);
print_r($_POST["hd"]);
print_r($_POST["tel"]);
print_r($_POST["installation"]);
print_r($_POST["com"]);
//print_r ($prestation_tvc);
/********************************************
Récupération des données de la première ligne.
******************************************/
$date1 = mysql_real_escape_string (trim($_POST['date'][1]));
$date2 = $today = date("Y-m-j");
$user = mysql_real_escape_string($_SESSION['nom']);
$ref = ($_POST['ref']);
$nom =($_POST['nom_client']);
$adr = ($_POST['adr']);
$code = ($_POST['postal']);
$commune = ($_POST['commune']);
$address_mac = $_POST['mac'][1].":".$_POST['mac'][2].":".$_POST['mac'][3].":".$_POST['mac'][4].":".$_POST['mac'][5].":".$_POST['mac'][6];
$tech = ($_POST['technicien']);
$heure_debut = ($_POST['ha'].":".$_POST['ha']);
$heure_fin = ($_POST['hd'].":".$_POST['hd']);
$telephone = ($_POST['tel']);
$installation = ($_POST['installation']);
$commentaire = ($_POST['com']); */
Il enregistre bien dans la table mais il sont vide

Bon alors voilà mon code #-o
[php]$prestation_tvc = array_map('addslashes', $_POST);
$prestation_tvc = Array('ref[1]', 'nom_client[1]', 'adr[1]', 'postal[1]', 'commune[1]', 'technicien[1]','ha[1]','hd[1]', 'tel[1]', 'installation[1]','com[1]','ref[2]', 'nom_client[2]', 'adr[2]', 'postal[2]', 'commune[2]', 'technicien[2]','ha[2]','hd[2]', 'tel[2]', 'installation[2]','com[2]',
'ref[3]', 'nom_client[3]', 'adr[3]', 'postal[3]', 'commune[3]', 'technicien[3]','ha[3]','hd[3]', 'tel[3]', 'installation[3]','com[3]');
print_r($_POST["ref"]);
print_r($_POST["nom_client"]);
print_r($_POST["adr"]);
print_r($_POST["postal"]);
print_r($_POST["commune"]);
print_r($_POST["technicien"]);
print_r($_POST["ha"]);
print_r($_POST["hd"]);
print_r($_POST["tel"]);
print_r($_POST["installation"]);
print_r($_POST["com"]);
//print_r ($prestation_tvc);
/********************************************
Récupération des données de la première ligne.
******************************************/
$date1 = mysql_real_escape_string (trim($_POST['date'][1]));
$date2 = $today = date("Y-m-j");
$user = mysql_real_escape_string($_SESSION['nom']);
$ref = ($_POST['ref']);
$nom =($_POST['nom_client']);
$adr = ($_POST['adr']);
$code = ($_POST['postal']);
$commune = ($_POST['commune']);
$address_mac = $_POST['mac'][1].":".$_POST['mac'][2].":".$_POST['mac'][3].":".$_POST['mac'][4].":".$_POST['mac'][5].":".$_POST['mac'][6];
$tech = ($_POST['technicien']);
$heure_debut = ($_POST['ha'].":".$_POST['ha']);
$heure_fin = ($_POST['hd'].":".$_POST['hd']);
$telephone = ($_POST['tel']);
$installation = ($_POST['installation']);
$commentaire = ($_POST['com']); */
[/php]
Il enregistre bien dans la table mais il sont vide :boire4: :tir2: