IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

[PHP-JS] où est l'erreur dans ce code php


Sujet :

Langage PHP

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    51
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 51
    Points : 44
    Points
    44
    Par défaut [PHP-JS] où est l'erreur dans ce code php
    bonjour

    j'ai ce message d'erreur qui s'affiche quand j'enregistre les modifications du compte

    Warning: Cannot modify header information - headers already sent by (output started at d:\wamp\www\orientalartdeco\php\modification.php:3) in d:wamp\www\orientalartdeco\php\modification.php on line 56
    si quelqu'un peut m'aider car je bloque merci a vous


    voici le code :
    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
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    <?php session_start(); ?>
    
    <?php require_once('../Connections/orientalartdeco.php'); ?>
    <?php
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
    
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;    
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }
    
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE table_compte_client SET Nom=%s, Prénom=%s, Adresse=%s, Code_postal=%s, Ville=%s, Téléphone=%s, Email=%s, Login=%s, `Mot _de_ passe`=%s WHERE Idclient=%s",
                           GetSQLValueString($_POST['Nom'], "text"),
                           GetSQLValueString($_POST['Prénom'], "text"),
                           GetSQLValueString($_POST['Adresse'], "text"),
                           GetSQLValueString($_POST['Code_postal'], "int"),
                           GetSQLValueString($_POST['Ville'], "text"),
                           GetSQLValueString($_POST['Téléphone'], "int"),
                           GetSQLValueString($_POST['Email'], "text"),
                           GetSQLValueString($_POST['Login'], "text"),
                           GetSQLValueString($_POST['Mot__de__passe'], "text"),
                           GetSQLValueString($_POST['Idclient'], "int"));
    
      mysql_select_db($database_orientalartdeco, $orientalartdeco);
      $Result1 = mysql_query($updateSQL, $orientalartdeco) or die(mysql_error());
    
      $updateGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      }
      header(sprintf("Location: %s", $updateGoTo));      erreur sur cette ligne apparemment  
    }
    
    $colname_Modification = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $colname_Modification = (get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']);
    }
    mysql_select_db($database_orientalartdeco, $orientalartdeco);
    $query_Modification = sprintf("SELECT * FROM table_compte_client WHERE Email = '%s'", $colname_Modification);
    $Modification = mysql_query($query_Modification, $orientalartdeco) or die(mysql_error());
    $row_Modification = mysql_fetch_assoc($Modification);
    $totalRows_Modification = mysql_num_rows($Modification);
    ?>
    <html>
    
    <head>
    <title>www.orientalartdeco.com Modification  </title>
    <meta name="generator" content="Namo WebEditor v5.0(Trial)" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
    
    <body bgcolor="white" text="black" alink="red">
    <p align="center"><img src="logo.gif" width="962" height="57" border="0" /></p>
    <div class="Style12" id="Layer33">
      <div align="left" class="Style13"><a href="signup.php">D&eacute;ja client</a></div>
    </div>
    <p align="right"><span style="font-size:16pt;"><b><i><span class="Style20"></span><font color="yellow">&nbsp;&nbsp;&nbsp;</font></i></b></span><span style="font-size:16pt;"><b><i><font color="yellow"> 
    &nbsp;&nbsp;</font></i></b></span><span style="font-size:16pt;"><b><i><font color="yellow">&nbsp;&nbsp; </font></i></b></span><a href="procheorientdeco.htm"></a> <b><i><font color="yellow">&nbsp;&nbsp;</font></i></b></p>
    <p>&nbsp;</p>
    
    <div class="Style10" id="Layer32">
      <div align="left"><a href="create.php" class="Style13">inscription en ligne</a></div>
    </div>
    <p align="center"><b><i><span style="font-size:48pt;">&nbsp;</span><span style="font-size:16pt;">&nbsp;&nbsp;</span></i></b></p>
    <DIV class=Style5 id=Layer1>
      <P align=center class="Style15 Style20">Modifier vos donn&eacute;es personnelles </P>
    </DIV>
    <div class="Style21" id="Layer44">
      <div align="center">Copyright 2007 tous droits r&eacute;serv&eacute;s www.orientalartdeco.com </div>
    </div>
    <div id="Layer47">
      <form method="post" name="form1" action="<?php echo $editFormAction; ?>">
        <table align="center">
          <tr valign="baseline">
            <td nowrap align="right">Nom:</td>
            <td><input name="Nom" type="text" value="<?php echo $row_Modification['Nom']; ?>" size="32" maxlength="50"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">Prénom:</td>
            <td><input name="Pr&eacute;nom" type="text" id="Pr&eacute;nom" value="<?php echo $row_Modification['Prénom']; ?>" size="32" maxlength="50"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">Adresse:</td>
            <td><input name="Adresse" type="text" value="<?php echo $row_Modification['Adresse']; ?>" size="32" maxlength="100"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">Code_postal:</td>
            <td><input name="Code_postal" type="text" value="<?php echo $row_Modification['Code_postal']; ?>" size="32" maxlength="5"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">Ville:</td>
            <td><input name="Ville" type="text" value="<?php echo $row_Modification['Ville']; ?>" size="32" maxlength="40"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">Téléphone:</td>
            <td><input name="T&eacute;l&eacute;phone" type="text" id="T&eacute;l&eacute;phone" value="<?php echo $row_Modification['Téléphone']; ?>" size="32" maxlength="10"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">Email:</td>
            <td><input name="Email" type="text" value="<?php echo $row_Modification['Email']; ?>" size="32" maxlength="50"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">Login:</td>
            <td><input name="Login" type="text" value="<?php echo $row_Modification['Login']; ?>" size="32" maxlength="20"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">Mot _de_ passe:</td>
            <td><input name="Mot__de__passe" type="text" value="<?php echo $row_Modification['Mot _de_ passe']; ?>" size="32" maxlength="20"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">&nbsp;</td>
            <td><input type="submit" value="Mettre à jour l'enregistrement"></td>
          </tr>
        </table>
        <input type="hidden" name="Idclient" value="<?php echo $row_Modification['Idclient']; ?>">
        <input type="hidden" name="MM_update" value="form1">
        <input type="hidden" name="Idclient" value="<?php echo $row_Modification['Idclient']; ?>">
      </form>
      <p>&nbsp;</p>
    </div>
    <p>&nbsp;</p>
    <div class="Style10" id="Layer34">
      <div align="right"><a href="mode_de_paiement.php">Modes de paiements </a></div>
    </div>
    <div class="Style10" id="Layer35">
      <div align="right"><a href="aide en ligne.php">Aide en ligne </a></div>
    </div>
    <div class="Style10" id="Layer36"><a href="SERVICES.php">Plans de travail sur mesure </a></div>
    <div class="Style10" id="Layer37">
      <div align="right"><a href="securite.php">S&eacute;curit&eacute;</a></div>
    </div>
    <div class="Style10" id="Layer38">
      <div align="right"><a href="livraison.php">Livraison</a></div>
    </div>
    <div class="Style10" id="Layer39"><a href="CONDITIONS_GENERALES_DE_VENTE.php">Conditions g&eacute;n&eacute;rales de ventes</a> </div>
    <div class="Style10" id="Layer40">
      <div align="right"><a href="contact.php">Contactez nous </a></div>
    </div>
    <div class="Style10" id="Layer41">
      <div align="right"><a href="espace_client.php">Mon compte</a> </div>
    </div>
    <div class="Style10" id="Layer42">
      <div align="right"><a href="../ACCOUNT/panier.php">Mon panier </a></div>
    </div>
    <div class="Style10" id="Layer43">
      <div align="right"><a href="ma commande.php">Ma commande </a></div>
    </div>
    <div class="Style14" id="Layer8">
      <div align="left" class="Style12">Pour modifier vos informations personnelles sur orientalartdeco compl&eacute;tez simplement le formulaire ci-joint. </div>
    </div>
    <p>&nbsp;</p>
    
    <p>&nbsp;</p>
    </body>
    
    </html>
    <?php
    mysql_free_result($Modification);
    ?>

  2. #2
    Membre averti
    Profil pro
    Inscrit en
    Août 2006
    Messages
    379
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France

    Informations forums :
    Inscription : Août 2006
    Messages : 379
    Points : 422
    Points
    422
    Par défaut
    Les balises [CODE ][/CODE ] et peut-être que tu aura une réponse ...

    P.s :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    header('Location: '.$updateGoTo);

Discussions similaires

  1. [DOM] quel est l'erreur dans mon code
    Par une_tite_question dans le forum Général JavaScript
    Réponses: 8
    Dernier message: 10/08/2008, 11h20
  2. [MySQL] Identification Login-password avec Mysql, ou est l'erreur dans le code ?
    Par fredob dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 29/06/2007, 09h33
  3. Erreur dans mon code php que j'arrive à voir
    Par babouba dans le forum Langage
    Réponses: 2
    Dernier message: 19/03/2007, 16h48
  4. Réponses: 5
    Dernier message: 14/05/2006, 22h41
  5. Erreur dans mon code PHP
    Par jack_1981 dans le forum Langage
    Réponses: 6
    Dernier message: 12/05/2006, 10h01

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo