Bonjour,
J'ai un truc trés bizarre, j'ai un form dans lequelle j'utile une function
Code :
<?php echo "Bonjour, ".$user;?>
Cette variable est déclarer comme ceci
Code :
$user = $_SESSION['nom'];
Quand on arrive sur le formulaire c'est bien le nom de session qui va avec le login on valide et là si tout se passe bien il y à un message
Code :
<font size="4"><?php echo"Merci " .$user;?> pour une prestation supplémentaire merci de cliquez ici</font></a></b></p>
Il y à un lien sur cette page qui permet de revenir en arrière pour un nouvelle encodage, et si je clique sur le lien j'ai à la place du nom de la session j'ai le nom encoder dans le champs nom du formulaire précédent.
J'ai même renomer le champ (nom_client) mais cela ne change rien ou va t'il chercher cette information ??????
mes pages.
le formulaire :
Code :
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| <?php
session_start();
if (!isset($_SESSION['login'])) {
header ('Location: ../index.php');
exit();
}
$user = $_SESSION['nom'];
?>
<html>
<head>
<meta http-equiv="Content-Language" content="fr-be">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>VD-CABLING S.A</title>
</head>
<script language="javascript" src="tvc.js"></script>
<body background="../../img/grd-4px.gif">
<div align="center">
<table border="0" id="table1" width="935">
<tr>
<td align="center">
<p align="center"><font color="#0000FF" size="7">VD-CABLING
S.A</font></p>
</td>
</tr>
<tr>
<td align="left"><font size="2">Rue des Mineurs,15</font></td>
</tr>
<tr>
<td align="left"><font size="2">4610 Beyne-Heusey</font></td>
</tr>
<tr>
<td align="left"><font size="2">Tél : 04/362.37.77</font></td>
</tr>
</table>
</div>
<table border="0" id="table2" width="935">
<tr>
<td align="center">
<p align="center"><font size="4">Encodage des prestations
<font color="#FF0000">tvc</font>@ble<font color="#FF0000">net</font> du
jour.</font></p>
<?php echo "Bonjour, ".$user;?>
<p></p>
</td>
</tr>
</table>
<center>
<form method="POST" onsubmit="return check1()" name="prestations_tvc" action="../enregistrement/validation_tvc.php">
<table border="0" id="table5" width="931">
<tr>
<td width="453"><font size="2">Date de l'installation :</font><input type="text" name="date_realisation[1]" value = '<? echo $today = date("Y-m-j") ?>' size="20" id="date_realisation[1]">
</td>
<td>
<p align="center">
<!--webbot bot="HTMLMarkup" startspan --><? $today = date (" Y-m-j");
echo "Nous sommes le". $today." ";
?><!--webbot bot="HTMLMarkup" endspan i-checksum="21062" --></p>
</td>
</tr>
</table>
<table border="0" id="table3" width="935" bgcolor="#C0C0C0" style="background-image: url('../../img/bg.gif')">
<tr>
<td width="69" align="center"><b><font size="1">Ref client</font></b></td>
<td width="248" align="center"><b><font size="1">Adresse client</font></b></td>
<td width="66" align="center"><font size="2">nom</font></td>
<td width="65" align="center"><b><font size="1">code postal</font></b></td>
<td width="71" align="center"><b><font size="1">Localité</font></b></td>
<td align="center"><b><font size="1">Adresse MAC</font></b></td>
</tr>
<tr>
<td width="69" align="center">
<input type="text" name="ref[1]" size="7" id="ref"></td>
<td width="248" align="center">
<input type="text" name="adr[1]" size="36" style="text-transform: capitalize" id="adr"></td>
<td width="66" align="center">
<p align="center">
<input type="text" name="nom_client[1]" size="12" style="text-transform: capitalize" id="nom_client"></p>
</td>
<td width="65" align="center">
<input type="text" name="postal[1]" size="6" id="postal"></td>
<td width="71" align="center">
<p align="center">
<input type="text" name="commune[1]" size="12" style="text-transform: capitalize" id="commune"></p>
</td> |
et mon fichier validation
Code :
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
| <?php
session_start();
if (!isset($_SESSION['login'])) {
header ('Location: ../index.php');
exit();
}
/******************************************************************************************************************************************************
Connexion à la base
******************************************************************************************************************************************************/
include "../../connect/fc-phpconnect_tvc.php";
/******************************************************************************************************************************************************
date
******************************************************************************************************************************************************/
$today = date("Y-m-j");
/*****************************************************************************************************************************************************
Récupération des données de la première ligne.
*****************************************************************************************************************************************************/
$date1 = mysql_real_escape_string (trim($_POST['date_realisation'][1]));
$date2 = $_today;
$user = $_SESSION['nom'];
$ref = mysql_real_escape_string (trim($_POST['ref'][1]));
$nom = mysql_real_escape_string (trim($_POST['nom_client'][1]));
$adr = mysql_real_escape_string (trim($_POST['adr'][1]));
$code = mysql_real_escape_string (trim($_POST['postal'][1]));
$commune = mysql_real_escape_string (trim($_POST['commune'][1]));
$address_mac = $_POST['mac'][1].":".$_POST['mac'][2].":".$_POST['mac'][3].":".$_POST['mac'][4].":".$_POST['mac'][5].":".$_POST['mac'][6] ;
$tech = mysql_real_escape_string (trim($_POST['technicien']));
$heure_debut = mysql_real_escape_string (trim($_POST['ha'][1].":".$_POST['ha'][2]));
$heure_fin = mysql_real_escape_string (trim($_POST['hd'][1].":".$_POST['hd'][2]));
$telephone = mysql_real_escape_string (trim($_POST['tel'][1]));
$installation = mysql_real_escape_string (trim($_POST['installation']));
$commentaire = mysql_real_escape_string (trim($_POST['com'][1]));
/*****************************************************************************************************************************************************
Insertion dans la base de la ligne 1.
*****************************************************************************************************************************************************/
$sql = "INSERT INTO prestation_beta (date_realisation, date_encodage, nom_utilisateur, ref_client,
nom_client, adr_client, code_postal, commune, adr_modem,
technicien, heure_debut, heure_fin, telephone, etat_installation, commentaire) values ( '".$date1."','".$date2."','".$user."','".$ref."',
'".ucfirst($nom)."','".ucfirst($adr)."','".$code."','".ucfirst($commune)."','".strtoupper($address_mac)."', '".$tech."','".$heure_debut."','".$heure_fin."','"
.$telephone."','".$installation."','".ucfirst($commentaire)."')";
$insert = mysql_query($sql) or die (mysql_error());
mysql_close();
?>
<html>
<head>
</head>
<body>
<body background="../../img/grd-4px.gif">
Merci les informations sont enregistrées.
<p align="center"><b><a href="../prestations/vdcabling.php">
<font size="4"><?php echo"Merci " .$user;?> pour une prestation supplémentaire merci de cliquez ici</font></a></b></p>
<p><b><font color="#FF0000">
<a href="../deconnexion.php"><font color="#FF0000">Déconnexion</font></a>
</body>
</font>
</b>
</p>
</body>
</html> |

C'est vraiment truc bizarre........
Détail important peut-être en local sous WAMP cela fonctionne mais sur mon serveur WEB il déconne