Bonjour,

Je suis sur une fiche client et j'ai modifié le script de façon à ce que soit automatique à l'affichage :
* Le nom complet en Majuscules
* La 1ère lettre du prénom en Majuscule
* La 1ère lettre de la commune en Majuscule
* Le N° SIRET soit tronqué tous les 3 chiffres par un espace
* Le N° de Tel soit tronqué tous les 2 chiffres par un point

Quand je modifie la fiche client ça marche mais si j'enregistre encore, l'affichage n'est plus correct.

Lors de la saisie :
Nom : saisie.png
Affichages : 186
Taille : 10,5 Ko

Après l'enregistrement :
Nom : enregistrement.png
Affichages : 186
Taille : 11,0 Ko

Après un 2e enregistrement si aucune modification faite :
Nom : enregistrement2.png
Affichages : 178
Taille : 11,0 Ko

Je vous soumet le script car je ne vois pas où est l'erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
if (!defined('IN_WWW') || !defined('IN_ADMIN'))
    exit();
 
if(!isset($prenom))
    $prenom = '';
if(!isset($nom))
    $nom = '';
if(!isset($ste))
    $ste = '';
if(!isset($siret))
    $siret = '';	
if(!isset($adresse))
    $adresse = '';
if(!isset($adresse2))
    $adresse2 = '';
if(!isset($cp))
    $cp = '';
if(!isset($commune))
    $commune = '';	
if(!isset($email))
    $email = '';
if(!isset($mobile))
    $mobile = '';
if(!isset($fixe))
    $fixe = '';
if(!isset($fax))
    $fax = '';	
if(!isset($email_paypal))
    $email_paypal = '';
if(!isset($commentaire))
    $commentaire = '';
 
$site_Content .= '
<form name="form1" id="form1" method="post" action="">
  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr>
      <td height="30">Nom</td>
      <td><input name="nom" value="'.ucfirst(strtoupper($nom)).'" type="text" id="nom" /></td>
      <td>Pr&eacute;nom</td>
      <td><input name="prenom" value="'.ucfirst(strtolower($prenom)).'" type="text" id="prenom" /></td>
    </tr>
	<tr>
      <td>Date de naissance</td>
      <td><input name="naissance" value="'.$naissance.'" type="date" id="naissance" /></td>
      <td></td>
      <td></td>
    </tr>
  </table>
<br /><br /><br />
  <table width="100%"  border="0" cellspacing="0" cellpadding="0">	
	<tr>
      <td height="30">St&eacute;</td>
      <td><input name="ste" value="'.$ste.'" type="text" id="ste" /></td>
      <td>SIRET</td>
      <td><input name="siret" value="'.chunk_split($siret,3,' ').'" type="text" id="siret" /></td>
    </tr>
	<tr>
      <td height="30">Adresse</td>
      <td><input name="adresse" value="'.$adresse.'" type="text" id="adresse" /></td>
      <td></td>
      <td></td>
    </tr>
	<tr>
      <td height="30">Adresse (compl&eacute;ment)</td>
      <td><input name="adresse2" value="'.$adresse2.'" type="text" id="adresse2" /></td>
      <td></td>
      <td></td>
    </tr>
	<tr>
      <td height="30">CP</td>
      <td><input name="cp" value="'.$cp.'" type="text" id="cp" /></td>
      <td>Commune</td>
      <td><input name="commune" value="'.ucfirst(strtolower($commune)).'" type="text" id="commune" /></td>
    </tr>
  </table>
<br /><br /><br />
  <table width="100%"  border="0" cellspacing="0" cellpadding="0">	
	<tr>
      <td height="30">e-mail</td>
      <td><input name="email" value="'.$email.'" type="text" id="email" /></td>
      <td></td>
      <td></td>
    </tr>
	<tr>
      <td height="30">N&deg; Portable</td>
      <td><input name="mobile" value="'.chunk_split($mobile,2,'.').'" type="text" id="mobile" /></td>
      <td>N&deg; Fixe</td>
      <td><input name="fixe" value="'.chunk_split($fixe,2,'.').'" type="text" id="fixe" /></td>
    </tr>
	<tr>
      <td></td>
      <td></td>
	  <td height="30">N&deg; Fax</td>
      <td><input name="fax" value="'.chunk_split($fax,2,'.').'" type="text" id="fax" /></td>
    </tr>
	<tr>
      <td height="30">e-mail Paypal</td>
      <td><input name="email_paypal" value="'.$email_paypal.'" type="text" id="email_paypal" /></td>
    </tr>
  </table>
<br /><br /><br />
  <table width="100%"  border="0" cellspacing="0" cellpadding="0">	
	<tr>
      <td height="30">Commentaire</td>
      <td><input name="commentaire" value="'.$commentaire.'" type="text" id="commentaire" /></td>
    </tr>
    <tr>
      <td colspan="4"><br />
      <input type="submit" name="Submit" value="Mettre &agrave; jour" /></td>
    </tr>
  </table>';