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

Dreamweaver Discussion :

Récupérer les infos d'un formulaire


Sujet :

Dreamweaver

  1. #1
    Futur Membre du Club
    Femme Profil pro
    Chef de projet MOA
    Inscrit en
    Février 2012
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Chef de projet MOA
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Février 2012
    Messages : 5
    Points : 5
    Points
    5
    Par défaut Récupérer les infos d'un formulaire
    Bonjour,

    Afin d'accéder au site en cours de création, les membres ont deux possibilités :
    - s'identifier (pseudo + mot de passe)
    - s'inscrire

    Après diverses vérifications du formulaire d'inscription et création d'un enregistrement dans la table des Membres, je voudrais pouvoir afficher le profil du membre qui vient de s'inscrire dans une nouvelle page et en entête de cette page, avoir son pseudo et son avatar (de même pour le pseudo du membre qui s'est identifié).

    Si Dreamweaver facilite les choses, lorsque je regarde le code, j'ai du mal à retrouver mes petits ...
    J'aimerais que vous m'expliquiez simplement comment je peux faire pour récupérer ces infos, car cela conditionne toutes les pages de mon site.
    Merci de vos lumières

    Voici le code de ma page d'inscription :
    Code php : 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
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    <?php require_once('Connections/comsite.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }
     
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
    }
    }
     
    // *** Redirect if username exists
    $MM_flag="MM_insert";
    if (isset($_POST[$MM_flag])) {
      $MM_dupKeyRedirect="LoginErreurinscrip.php";
      $loginUsername = $_POST['ch_mem_pseudo'];
      $LoginRS__query = sprintf("SELECT ch_mem_pseudo FROM tab_membres WHERE ch_mem_pseudo=%s", GetSQLValueString($loginUsername, "text"));
      mysql_select_db($database_comsite, $comsite);
      $LoginRS=mysql_query($LoginRS__query, $comsite) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
     
      //if there is a row in the database, the username was found - can not add the requested username
      if($loginFoundUser){
        $MM_qsChar = "?";
        //append the username to the redirect page
        if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&";
        $MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername;
        header ("Location: $MM_dupKeyRedirect");
        exit;
      }
    }
     
     
     
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }
     
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "Inscrire")) {
      $insertSQL = sprintf("INSERT INTO tab_membres (ch_mem_pseudo, ch_mem_email, ch_mem_pass, ch_mem_nom, ch_mem_prenom, ch_mem_sexe, ch_mem_naissance, ch_mem_publie_nom, ch_mem_publie_pre, ch_mem_publie_sexe, ch_mem_publie_nais, ch_mem_pays, ch_mem_qualite, ch_mem_parrain, ch_mem_site, ch_mem_avatar, ch_mem_parler_soi, ch_mem_niveau) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['ch_mem_pseudo'], "text"),
                           GetSQLValueString($_POST['ch_mem_email'], "text"),
                           GetSQLValueString($_POST['ch_mem_pass'], "text"),
                           GetSQLValueString($_POST['ch_mem_nom'], "text"),
                           GetSQLValueString($_POST['ch_mem_prenom'], "text"),
                           GetSQLValueString($_POST['ch_mem_sexe'], "text"),
                           GetSQLValueString($_POST['ch_mem_naissance'], "date"),
                           GetSQLValueString($_POST['ch_mem_publie_nom'], "int"),
                           GetSQLValueString($_POST['ch_mem_publie_pre'], "int"),
                           GetSQLValueString($_POST['ch_mem_publie_sexe'], "int"),
                           GetSQLValueString($_POST['ch_mem_publie_nais'], "int"),
                           GetSQLValueString($_POST['ch_mem_pays'], "text"),
                           GetSQLValueString($_POST['ch_mem_qualite'], "text"),
                           GetSQLValueString($_POST['ch_mem_parrain'], "text"),
                           GetSQLValueString($_POST['ch_mem_site'], "text"),
                           GetSQLValueString($_POST['ch_mem_avatar'], "text"),
                           GetSQLValueString($_POST['ch_mem_parler_soi'], "text"),
                           GetSQLValueString($_POST['ch_mem_niveau'], "int"));
     
      mysql_select_db($database_comsite, $comsite);
      $Result1 = mysql_query($insertSQL, $comsite) or die(mysql_error());
     
      $insertGoTo = "profilMembre_accueil.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      }
      header(sprintf("Location: %s", $insertGoTo));
    }
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Bienvenue sur ************ ! : identification</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     
    <link href="reset.css" rel="stylesheet" type="text/css">
    <link href="styles/visuel_02b.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    .page_generale_bis h4 {
    	font: 18px "Comic Sans MS", cursive;
    	margin-top: 40px;
    	width: 600px;
    	text-align: center;
    	margin-right: auto;
    	margin-left: auto;
    }
    .page_generale_bis #en_tete {
    	text-align: center;
    }
    .page_generale_bis .footer .menu_pied {
    	margin-top: 100px;
    	padding-left: 100px;
    }
    .page_generale_bis .bas_page {
    	width: 960px;
    	font-size: 8px;
    	margin-right: auto;
    	margin-left: auto;
    	text-align: center;
    	display: block;
    }
    </style>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
    <link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css">
    <link href="SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css">
    <link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css">
    </head>
    <body class="page_generale_bis" >
    <!-- Bannière du site -->
    <div id="en_tete">
      <p><img src="image/LogoCDCo.jpg" width="960" height="400" alt="logoCDCo"></p>
    </div>
    <!-- Accroche -->
    <h4> **.</h4>
    <h2>S'incrire</h2>
    <p style="text-align:center">Les champs munis d'une * sont obligatoires</p>
    <div class="inscrire">
      <fieldset>
        <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="Inscrire" id="Inscrire">
          <table width="850" border="0" cellspacing="5" cellpadding="2">
            <tr>
              <th colspan="3" scope="row"><h4>Identifiants</h4></th>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Pseudo : *</strong></th>
              <td colspan="2"><label for="ch_mem_pseudo"></label>
                <span id="sprytextfield2">
                <input name="ch_mem_pseudo" type="text" id="ch_mem_pseudo" size="50">
                <span class="textfieldRequiredMsg">Une valeur est requise.</span></span></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Email : *</strong></th>
              <td colspan="2"><label for="ch_mem_email"></label>
                <span id="sprytextfield3">
                <input name="ch_mem_email" type="text" id="ch_mem_email" size="80">
                <span class="textfieldRequiredMsg">Une valeur est requise.</span><span class="textfieldInvalidFormatMsg">Format non valide.</span></span></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Mot de passe : *</strong></th>
              <td colspan="2"><label for="ch_mem_pass"></label>
                <span id="sprypassword1">
                <input name="ch_mem_pass" type="password" id="ch_mem_pass" size="50">
                <span class="passwordRequiredMsg">Une valeur est requise.</span></span></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Confirmer le mot de passe : *</strong></th>
              <td colspan="2"><label for="textfield"></label>
                <span id="spryconfirm1">
                <input name="textfield" type="password" id="textfield" size="50">
                <span class="confirmRequiredMsg">Une valeur est requise.</span><span class="confirmInvalidMsg">Les valeurs ne correspondent pas.</span></span></td>
            </tr>
            <tr>
              <th colspan="3" scope="row"><h4>Coordonn&eacute;es</h4></th>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Nom : *</strong></th>
              <td><label for="ch_mem_nom"></label>
                <span id="sprytextfield4">
                <input name="ch_mem_nom" type="text" id="ch_mem_nom" size="50">
                <span class="textfieldRequiredMsg">Une valeur est requise.</span></span></td>
              <td width="200"><label>Publi&eacute; :
                  <input name="ch_mem_publie_nom" type="radio" id="ch_mem_publie_nom_0" value="1" checked>
                  Oui</label>
                <label>
                  <input type="radio" name="ch_mem_publie_nom" value="0" id="ch_mem_publie_nom_1">
                  Non *</label></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Pr&eacute;nom: *</strong></th>
              <td width="300"><label for="ch_mem_prenom"></label>
                <span id="sprytextfield5">
                <input name="ch_mem_prenom" type="text" id="ch_mem_prenom" size="50">
                <span class="textfieldRequiredMsg">Une valeur est requise.</span></span></td>
              <td width="200"><label> Publi&eacute; :
                  <input name="ch_mem_publie_pre" type="radio" id="ch_mem_publie_pre_0" value="1" checked>
                  Oui</label>
                <label>
                  <input type="radio" name="ch_mem_publie_pre" value="0" id="ch_mem_publie_pre_1">
                  Non *</label></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Sexe : *</strong></th>
              <td width="300"><label>
                  <input name="ch_mem_sexe" type="radio" id="ch_mem_sexe_0" value="F" checked>
                  Femme</label>
                <label>
                  <input type="radio" name="ch_mem_sexe" value="H" id="ch_mem_sexe_1">
                  Homme</label></td>
              <td width="200"><label> Publi&eacute; :
                  <input name="ch_mem_publie_sexe" type="radio" id="ch_mem_publie_sexe_0" value="1" checked>
                  Oui</label>
                <label>
                  <input type="radio" name="ch_mem_publie_sexe" value="0" id="ch_mem_publie_sexe_1">
                  Non *</label></td>
            </tr>
            <tr>
              <th width="250" scope="row"><p><strong>Date de naissance : *</strong></p>
                <p><strong>(Format : AAAA-MM-JJ)</strong></p></th>
              <td width="300"><label for="ch_mem_naissance"></label>
                <span id="sprytextfield1"><span id="sprytextfield6">
                <input type="text" name="ch_mem_naissance" id="ch_mem_naissance">
                <span class="textfieldRequiredMsg">Une valeur est requise.</span><span class="textfieldInvalidFormatMsg">Format non valide.</span></span><span class="textfieldRequiredMsg">Une valeur est requise.</span><span class="textfieldInvalidFormatMsg">Format non valide.</span></span></td>
              <td width="200"><label>Publi&eacute; :
                  <input name="ch_mem_publie_nais" type="radio" id="ch_mem_publie_nais_0" value="1" checked>
                  Oui</label>
                <label>
                  <input type="radio" name="ch_mem_publie_nais" value="0" id="ch_mem_publie_nais_1">
                  Non *</label></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Pays : *</strong></th>
              <td colspan="2"><label for="ch_mem_pays"></label>
                <select name="ch_mem_pays" id="ch_mem_pays">
                  <option value="1">France</option>
                  <option value="2">Belgique</option>
                  <option value="3">Suisse</option>
                  <option value="4">Canada Fran&ccedil;ais</option>
                </select></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Qualit&eacute; : *</strong></th>
              <td colspan="2"><label>
                  <input name="ch_mem_qualite" type="radio" id="ch_mem_qualite_0" value="P" checked>
                  Particulier</label>
                <label>
                  <input type="radio" name="ch_mem_qualite" value="E" id="ch_mem_qualite_1">
                  Eleveur</label>
                <label>
                  <input type="radio" name="ch_mem_qualite" value="F" id="ch_mem_qualite_2">
                  Famille Accueil</label>
                <label>
                  <input type="radio" name="ch_mem_qualite" value="A" id="ch_mem_qualite_2">
                  Association</label></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Nom du parrain :</strong></th>
              <td colspan="2"><label for="ch_mem_parrain"></label>
                <input name="ch_mem_parrain" type="text" id="ch_mem_parrain" size="50"></td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Site internet :</strong></th>
              <td colspan="2"><label for="ch_mem_site"></label>
                <span id="sprytextfield7">
                <input name="ch_mem_site" type="text" id="ch_mem_site" size="80">
                <span class="textfieldInvalidFormatMsg">Format non valide.</span></span></td>
            </tr>
            <tr>
              <th colspan="3" scope="row"><h4>Personnalisation</h4></th>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Photo Avatar :</strong></th>
              <td width="300"><label for="ch_mem_avatar"></label>
                <input name="ch_mem_avatar" type="file" id="ch_mem_avatar" size="50"></td>
              <td width="200">&nbsp;</td>
            </tr>
            <tr>
              <th width="250" scope="row"><strong>Parler de soi :</strong></th>
              <td colspan="2"><label for="ch_mem_parler_soi"></label>
                <span id="sprytextarea1"><span id="sprytextarea2">
                <textarea name="ch_mem_parler_soi" id="ch_mem_parler_soi" cols="45" rows="5"></textarea>
                <span class="textareaMaxCharsMsg">Le nombre maximum de caractères a été dépassé.</span></span><span class="textareaMaxCharsMsg">Le nombre maximum de caractères a été dépassé.</span></span></td>
            </tr>
            <tr>
              <th colspan="3" scope="row"><h4>Terminer votre inscription en choisissant une option *</h4></th>
            </tr>
            <tr>
              <th colspan="3" scope="row"><strong>
                <label>
                  <input type="radio" name="ch_mem_niveau" value="10" id="ch_mem_niveau_0">
                  Je m'inscris gratuitement avec acc&egrave;s limit&eacute; et je valide imm&eacute;diatement mon inscription.</label>
                </strong></th>
            </tr>
            <tr>
              <th colspan="3" scope="row"><strong>
                <label>
                  <input type="radio" name="ch_mem_niveau" id="ch_mem_niveau_1" value="20" checked>
                  Je deviens Membre Gold et je renseigne la partie Paiement.</label>
                </strong></th>
            </tr>
            <tr>
              <th colspan="3" scope="row"><input name="cgu" type="checkbox" value="">
                Je reconnais avoir lu les conditions g&eacute;n&eacute;rales et les r&egrave;gles d'usage du site</th>
            </tr>
            <tr>
              <th width="250" scope="row">&nbsp;</th>
              <td width="300"><input type="submit" name="button" id="button" value="Envoyer">
                <input type="reset" name="button2" id="button2" value="Annuler"></td>
              <td width="200">&nbsp;</td>
            </tr>
          </table>
          <input type="hidden" name="MM_insert" value="Inscrire">
        </form>
      </fieldset>
    </div>
    <!-- Pied de page -->
     
    </div>
    <script type="text/javascript">
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["change"]});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "email", {validateOn:["change"]});
    var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1", {validateOn:["change"]});
    var spryconfirm1 = new Spry.Widget.ValidationConfirm("spryconfirm1", "ch_mem_pass", {validateOn:["change"]});
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["change"]});
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["change"]});
    var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "date", {format:"yyyy-mm-dd", validateOn:["change"]});
    var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7", "url", {validateOn:["change"], isRequired:false});
    var sprytextarea2 = new Spry.Widget.ValidationTextarea("sprytextarea2", {maxChars:255, validateOn:["change"], isRequired:false});
    </script>
    </body>
    </html>

    Celui de la page d'identification :
    Code php : 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
    <?php require_once('Connections/comsite.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }
     
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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']);
    }
    // on teste si le visiteur a soumis le formulaire de connexion, on écrit un enreg dans la table des mbres connectés
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ident")) {
      $insertSQL = sprintf("INSERT INTO tab_membres_connectes (ch_mem_con_pseudo) VALUES (%s)",
                           GetSQLValueString($_POST['ch_mem_pseudo'], "text"));
     
      mysql_select_db($database_comsite, $comsite);
      $Result1 = mysql_query($insertSQL, $comsite) or die(mysql_error());
    }
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    }
     
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    }
     
    if (isset($_POST['ch_mem_pseudo'])) {
      $loginUsername=$_POST['ch_mem_pseudo'];
      $password=$_POST['ch_mem_pass'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "accueilMembres.php";
      $MM_redirectLoginFailed = "LoginErreur.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_comsite, $comsite);
     
      $LoginRS__query=sprintf("SELECT ch_mem_pseudo, ch_mem_pass FROM tab_membres WHERE ch_mem_pseudo=%s AND ch_mem_pass=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); 
     
      $LoginRS = mysql_query($LoginRS__query, $comsite) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
     
    	if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;	      
     
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];	
        }
        header("Location: " . $MM_redirectLoginSuccess );
      }
      else {
        header("Location: ". $MM_redirectLoginFailed );
      }
    }
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Bienvenue sur ********** ! : identification </title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     
    <link href="reset.css" rel="stylesheet" type="text/css">
    <link href="styles/visuel_02b.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    .page_generale_bis h4 {
    	font: 18px "Comic Sans MS", cursive;
    	margin-top: 40px;
    	width: 600px;
    	text-align: center;
    	margin-right: auto;
    	margin-left: auto;
    }
    .page_generale_bis #en_tete {
    	text-align: center;
    }
    .page_generale_bis .footer .menu_pied {
    	margin-top: 100px;
    	padding-left: 100px;
    }
    .page_generale_bis .bas_page {
    	width: 960px;
    	font-size: 8px;
    	margin-right: auto;
    	margin-left: auto;
    }
    </style>
    </head>
    <body class="page_generale_bis" >
    <!-- Bannière du site -->
    <div id="en_tete">
      <p><img src="image/LogoCDCo.jpg" width="960" height="400" alt="logoCDCo"></p>
    </div>
    <!-- Accroche -->
    <h4> Réseau animalier solidaire pour les passionnés d'animaux. Laissez vos animaux confier leurs souvenirs intimes de joie, de peine et de délires.</h4>
    <h2>S'identifier</h2>
    <div class="ident">
      <fieldset>
          <form ACTION="<?php echo $editFormAction; ?><?php echo $loginFormAction; ?>" name="ident" method="POST">
          <table width="600" border="0" cellspacing="5" cellpadding="2">
            <tr>
              <th width="160" scope="row"><strong>Pseudo :</strong></th>
              <td colspan="2"><label for="ch_mem_pseudo"></label>
              <input name="ch_mem_pseudo" type="text" id="ch_mem_pseudo" size="50"></td>
            </tr>
            <tr>
              <th scope="row"><strong>Mot de passe :</strong></th>
              <td colspan="2"><label for="ch_mem_pass"></label>
              <input name="ch_mem_pass" type="password" id="ch_mem_pass" size="50"></td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td width="160"><input type="submit" name="button" id="button" value="Envoyer"></td>
            </tr>
            <tr>
              <th colspan="3" scope="row"><a href="mailto:catsdogsandco@orange.fr?subject=Mot de passe oublie"><em>Mot de passe oubli&eacute; ?</em></a></th>
            </tr>
            <tr>
              <th colspan="3" scope="row"><h3><a href="inscription.php"><em>S'inscrire</em></a></h3></th>
            </tr>
          </table>
          <input type="hidden" name="MM_insert" value="ident">
        </form>
      </fieldset>
    </div>
    <!-- Pied de page -->
    <div class="footer">
      <ol class="menu_pied">
        <li><a href="#">A propos de *****</a></li>
        <li><a href="#">Equipe dirigeante</a></li>
        <li><a href="#">FAQ</a></li>
        <li><a href="#">Nous contacter</a></li>
        <li><a href="../HTML/cgu.php">Conditions générales d'utilisation</a></li>
        <li>R&eacute;alisation du site ***</li>
      </ol>
    </div>
    </body>
    </html>

  2. #2
    Membre du Club
    Homme Profil pro
    Inscrit en
    Janvier 2012
    Messages
    61
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Argentine

    Informations forums :
    Inscription : Janvier 2012
    Messages : 61
    Points : 42
    Points
    42
    Par défaut
    Bon je crois ce que tu veux faire est plutôt facile tu veux afficher les dernier inscrit dans ton site dans une page et leur avatar aussi , tu va dans le jeu d'enregistrement qui contient les information de tes membres tu glisse les information que tu veux afficher dans la page avec le comportement région répétée, tu glisse pseudo/avatar et le tour sera jouer

    espérant que j'ai bien expliquer et que ton problème sera résolu

Discussions similaires

  1. Récupérer toutes les infos d'un formulaire dans un mail
    Par oslanstudio dans le forum Langage
    Réponses: 4
    Dernier message: 23/01/2012, 14h20
  2. Récupérer par mail les infos d'un formulaire
    Par pointup dans le forum Général Conception Web
    Réponses: 1
    Dernier message: 04/08/2009, 16h09
  3. Récupérer les infos d'un formulaire dans une table
    Par Le_Shadock dans le forum WinDev
    Réponses: 9
    Dernier message: 18/04/2008, 09h26
  4. Création Formulaire et récupérer les infos
    Par netsuke dans le forum Langage
    Réponses: 2
    Dernier message: 23/03/2008, 09h34
  5. Réponses: 3
    Dernier message: 13/09/2007, 13h33

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