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

EDI, CMS, Outils, Scripts et API PHP Discussion :

[phpBB] Captcha sur formulaire d'inscription à un forum phpbb depuis un autre site


Sujet :

EDI, CMS, Outils, Scripts et API PHP

  1. #1
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Février 2013
    Messages
    21
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Février 2013
    Messages : 21
    Points : 16
    Points
    16
    Par défaut [phpBB] Captcha sur formulaire d'inscription à un forum phpbb depuis un autre site
    Bonjour,

    J'ai un formulaire d'inscription à mon forum phpbb depuis mon site principal. Je n'arrive pas à faire fonctionner le captcha, même si le bon code est rentré, il me dit que ce code est erroné.

    J'ai suivi ce tuto tout en l'adaptant puisque l'une des directives est d'être loggué en arrivant sur le forum (http://forums.phpbb-fr.com/documenta...a174-view.html).
    Je mets mon code ci-dessous si vous pouvez m'aider, je ne sais pas comment régler le problème.
    Merci beaucoup pour votre aide


    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
    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
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
     
     <?php
    	 session_start();
     
    	 error_reporting(0);
     
    	 define('IN_PHPBB', true);
         $phpbb_root_path =  './wordpress/Forum/';
         $phpEx = substr(strrchr(__FILE__, '.'), 1);
    	 include($phpbb_root_path . 'common.' . $phpEx);
    	 require($phpbb_root_path . 'includes/functions_user.' . $phpEx);
    	 $user->session_begin();
    	 $auth->acl($user->data);
    	 $user->setup('ucp');
     
     
     
     
     
     
     
     
     
     
     
    	 $messageClient = '';
    	 $sujet = '';
    	 $message = '';
     
     
    	$error = array();
    	$data = array(
    		'username'			=> utf8_normalize_nfc(request_var('username', '', true)),
    		'password'			=> request_var('password', '', true),
    		'password_confirm'	=> request_var('password_confirm', '', true),
    		'email'				=> strtolower(request_var('email', '')),
     
    	);
     
     
     
    if (isset($_POST['submit'])) 
    {
    	$error = validate_data($data, array(
    		'username'			=> array(
    			array('string', false, $config['min_name_chars'], $config['max_name_chars']),
    			array('username', '')),
    		'password'		=> array(
    			array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
    			array('password')),
    		'password_confirm'	=> array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
    		'email'				=> array(
    			array('string', false, 6, 60),
    			array('email')),
     
     
    	));
    	$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
     
     
    	//ajout captcha
    if ($config['enable_confirm'])
    {
    	include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
    	$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
    	$captcha->init(CONFIRM_REG);
    }
    //
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    	if (!sizeof($error))
    	{
    		if ($data['password'] != $data['password_confirm'])
    		{
    			$error[] = $user->lang['NEW_PASSWORD_ERROR'];
    		}
    	}
     
     
     
     
     
     
    	if (!sizeof($error))
    	{
    		$group_name =  'REGISTERED';
    		$sql = 'SELECT group_id
    					FROM ' . GROUPS_TABLE . "
    					WHERE group_name = '" . $db->sql_escape($group_name) . "'
    						AND group_type = " . GROUP_SPECIAL;
    		$result = $db->sql_query($sql);
    		$row = $db->sql_fetchrow($result);
    		$db->sql_freeresult($result);
    		if (!$row)
    		{
    			trigger_error('NO_GROUP');
    		}
    		$group_id = $row['group_id'];
     
    		$_SESSION['email']	= strtolower(request_var('email', ''));
     
    		$user_row = array(
    			'username'				=> $data['username'],
    			'user_password'			=> phpbb_hash($data['password']),
    			'user_email'			=> $_SESSION['email'],
    			'group_id'				=> (int) $group_id,
    			'user_timezone'			=> (float) $config['board_timezone'],
    			'user_dst'				=> $config['board_dst'],
    			'user_lang'				=> basename($user->lang_name),
    			'user_type'				=> USER_NORMAL,
    			'user_actkey'			=> '',
    			'user_ip'				=> $user->ip,
    			'user_regdate'			=> time(),
    			'user_inactive_reason'	=> 0,
    			'user_inactive_time'	=> 0,
    		);
    		$user_id = user_add($user_row);
    		if ($user_id === false)
    		{
    			trigger_error('NO_USER', E_USER_ERROR);
    		}
     
     
     
     
     
     
     
    		if(isset($_POST) && isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
    	if(!empty($_POST['username']) && !empty($_POST['email']) && !empty($_POST['password'])){
     
     
     
    	$exp = "webmaster@test.fr";
    	$e_mail_por= "webmaster@est.fr";                  
        $destinataire = "webmaster@test.fr";                    
    	$From ='From: test< '.$exp.'>'."\n"; 
    	$From .='Reply-To: '.$e_mail_por.''."\n";
    	$From .='MIME-Version: 1.0'."\n";
    	$From .='Content-Type: text/html; charset="iso-8859-1"'."\n";
    	$From .='Content-Transfer-Encoding: 8bit'; 
    	$From .= 'Disposition-Notification-To:'. $exp ."\n";
    	$From .= 'X-Priority: 1  \n'."\n";
    	$From .= 'X-MSMail-Priority: High'."\n";	
    	$email_client   = $_SESSION['email'];
    	$sujetClient = "Your Forum inscription";
    	$sujetAdmi = "Nouvelle inscription sur le forum";
    	$messageClient = $messageClient . "<br><br>Nouvelle inscription sur le Forum <br> ";
    	$messageClient = $messageClient . "Username : ".$_POST['username'] . "\n";
    	$messageClient = $messageClient . "<br><br>" ."\n";
        $messageClient = $messageClient ."Email : " . $_SESSION['email'] . "\n";
    	$messageClient = $messageClient . "<br><br>" ."\n";
     
     
    	$message = $message . "<br><br>Thank you for registering on the forum.<br> " ."\n";
    	$message = $message . "Username : ".$_POST['username'] . "\n";
    	$message = $message . "<br>" ."\n";
        $message = $message . "Email : " . $_SESSION['email'] . "\n";
    	$message = $message . "<br>" ."\n";
     
    	$urlforum = './wordpress/Forum/';
     
    		//Mail confirmation administrateur	
    		mail($destinataire, $sujetAdmi, utf8_decode($messageClient), $From);
     
            // Mail confirmation au client
     
    		mail($email_client, $sujetClient, utf8_decode($message), $From);
     
     
            echo "<script>alert('". "A confirmation email has been sent to the following address: " . $email_client  . "');</script>";
     
     
    	}
    }	
     
     
     
     
     
     
     
     
     
    	/*var_dump($_SESSION['captcha']) ;
    		echo $_SESSION['captcha'];
    		echo '<script>alert("ici");</script>';
    		
    		echo "<script>alert('". "A confirmation email has been sent to the following address: " . $_SESSION['captcha']  . "');</script>"; */
     
     
     
     
     
     
    		////-------------- AUTO - LOGIN --------------------------------------////
     
    	// Basic parameter data
     
    	$user->lang['ACCOUNT_ADDED_AUTOLOGIN'] ='';
    	$user->lang['ACCOUNT_ADDED_LOGIN_SUCCESS'] ='';
     
    	$id 	= request_var('i', '');
    	$mode	= request_var('mode', '');
    	$message = $user->lang['ACCOUNT_ADDED_AUTOLOGIN'];
    					$auto_login = true;
     
    	if (in_array($mode, array('login', 'logout', 'confirm', 'sendpassword', 'activate')))
    		{
    			define('IN_LOGIN', true);
    		}
     
     
     
    		if ($auto_login)
    				{
    					$result = $auth->login($data['username'], $data['password'], true, true, 0);
    					if ($result['status'] != LOGIN_SUCCESS)
    					{
    						$err = $user->lang[$result['error_msg']];
    						if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD')
    						{
    							$err = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
    						}
    						$message = $message . '<br />' . sprintf($user->lang['ACCOUNT_ADDED_LOGIN_FAILED'], $err);
    					}
    					else
    					{
    						$message = $message . '<br />' . sprintf($user->lang['ACCOUNT_ADDED_LOGIN_SUCCESS'], $data['username']);
    						$auth->acl($user->data);
    					}
    				}
     
     
     
     
    		$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
    				trigger_error($message);
     
     
     
     
    		//ajout captcha
    	if ($config['enable_confirm'])
    	{
    		$vc_response = $captcha->validate($data);
    		if ($vc_response !== false)
    		{
    			$error[] = $vc_response;
    		}
     
    		if ($config['max_reg_attempts'] && $captcha->get_attempt_count() > $config['max_reg_attempts'])
    		{
    			$error[] = $user->lang['TOO_MANY_REGISTERS'];
    		}
    	}
    	//
     
     
     
     
     
     
     
    	//ajout captcha
    		if ($config['enable_confirm'])
    		{
    			$captcha->reset();
    		}
    		$url = append_sid('./index.php');	
     
     
     
    			die( '<html>
    			<head>
    				<META http-equiv="Refresh"
    				content="10; URL=' . $url . '">
    			</head>
    			<body>
    			Votre compte a été enregistré avec succès<br />
    			
    			
    			
    			Vous allez être maintenant redirigé vers <a href="' . append_sid('http://localhost/testLocal/wordpress/Forum/index.php') . '">la page d\'index</a>
    			
    			
    			
    			
    			
    			</body>
    		</html>');
    	}
    }
    echo '<html>
    <head>
    	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    	<title>Vous enregistrer</title>
    </head>
    <body>
    	<form method="post">';
     
    	//ajout patcha
    if ($config['enable_confirm'])
    {
    	$confirm_id = $captcha->confirm_id;
    	$confirm_code = true;
    	$confirm_image='<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&amp;confirm_id=' . $confirm_id . '&amp;type=' . CONFIRM_REG) . '" alt="" title="" />';
    }
     
     
    if (sizeof($error))
    {
    	echo '<font color="red"><b>' . implode('<br />', $error) . '</b></font>';;
     
    }
     
     
     
    ?>
     
     
     
     
     
     
    <div id="ContInscription2">
      <table width="652" border="0" cellpadding="0" cellspacing="0" style="padding-left:10px;">
     
                            <tr>
                                <td colspan="4" ></td>
                            </tr>
     
     
                            <tr>
                                <td colspan="4" ></td>
                            </tr>
     
                            <tr>
                                <td colspan="4" class="error2"></td>
                            </tr>
     
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="3">
     
     
     
    						  <table width="644" border="0" cellspacing="0" cellpadding="0">
     
                                <tr>
                                  <td colspan="3" style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 0px solid #C5D8E9; background-color:#ffffff;"><p style="font-weight:bold;font-family: Arial, Helvetica, sans-serif;color:#3779AA;margin-top: 0px;font-size: 16px;padding-top: 0px;padding-right: 0px;padding-bottom: 5px;padding-left: 0px;">Register on the FORUM </p>
                                    <p style="font-family: Arial, Helvetica, sans-serif;color:#68A0CE;margin-top: 0px;font-size: 12px;padding-top: 0px;padding-right: 0px;padding-bottom: 5px;padding-left: 0px;">Présentation du forum <br />
                             <br /></p></td>
                                  <td width="156">&nbsp;</td>
                                </tr>
                              </table>						  </td>
                            </tr>
     
                            <tr>
                              <td width="4">&nbsp;</td>
                              <td width="184">&nbsp;</td>
                              <td colspan="2">&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td style="background-color:#ffffff;font-family: Arial, Helvetica, sans-serif;font-size: 14px;color: #3779AA;font-weight: normal;margin-bottom: 0px;margin-bottom: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Pseudonym: </strong></td>
                              <td width="375"><input type="text" tabindex="1" name="username" class="loginRemplissage" size="25" value="<?php echo $data['username']; ?>" /><span id="error_emailInscription1" class="error">*</span></td>
                              <td width="89">&nbsp;</td>
                            </tr>
     
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="3" rowspan="2"><table width="644" border="0" cellspacing="0" cellpadding="0">
     
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 0px solid #C5D8E9; background-color:#ffffff;">&nbsp;</td>
                                  <td align="left" valign="top" style="background-color:#ffffff;"></td>
                                  <td style="color: #3779aa;font-family: Arial,Helvetica,sans-serif;font-size: 10px;font-weight: normal;margin: 0 10px 0 4px;padding: 0;text-align: justify;">The length must be between 3 and 20 characters.</td>
                                  <td>&nbsp;</td>
                                </tr>
                                <tr>
                                  <td style="border-top: 1px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td width="144" align="left" valign="top" style="border-top: 1px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 0px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="border-top: 1px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td>&nbsp;</td>
                                </tr>
     
                                <tr>
                                  <td width="40" style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;"><label for="email" class="TexteLogin">E-mail: </label></td>
                                  <td width="374" style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9;background-color:#f2f8fd;"><input id="emailInscription1" tabindex="4" name="email" type="text" class="loginRemplissage" SIZE="40" maxlength="100" value="<?php echo $_SESSION['email']; ?>"/>
                                  <span id="error_emailInscription1" class="error">*</span></td>
                                  <td width="86">&nbsp;</td>
                                </tr>
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;"><label for="password" class="TexteLogin">My password: </label></td>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9;background-color:#f2f8fd;">
    	<input type="password" tabindex="2" name="password" size="25" class="loginRemplissage" value="<?php echo $data['password']; ?>" />						  
     
     
    							  <span id="error_emailInscription1" class="error">*</span></td>
                                  <td>&nbsp;</td>
                                </tr>
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;"> <label for="pass_confirm" class="TexteLogin">Confirm password: </label></td>
                                  <td style="background-color:#f2f8fd;border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9;">
     
    				<input type="password" tabindex="3" name="password_confirm" class="loginRemplissage" size="25" value="<?php echo $data['password_confirm']; ?>" />			  
     
     
     
    							  <span id="error_emailInscription1" class="error">*</span></td>
                                </tr>
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9;">&nbsp;</td>
                                </tr>
     
     
    <?php
    if ($confirm_code)
    {
    ?>										
     
     
                                <tr>
     
     
     
     
     
    							  <td><?php echo $user->lang['CONFIRM_CODE'] . '<br />' . $user->lang['CONFIRM_CODE_EXPLAIN']; ?></td>
          <td><input type="hidden" name="confirm_id" value="<?php echo $confirm_id; ?>" /><?php echo $confirm_image; ?></td>
       </tr>
       <tr>
          <td>&nbsp;</td>
          <td><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" /></td>
     
    <?php
    }
    ?>
                                </tr>
     
     
     
    <?php
    /*}*/
     
     
     
     
    ?>							
     
     
     
     
     
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 1px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;border-bottom: 1px solid #C5D8E9;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;border-bottom: 1px solid #C5D8E9;border-right: 1px solid #C5D8E9;"><span class="error">*</span> <span class="error">Must be  filled </span> </td>
                                  <td>&nbsp;</td>
                                </tr>
     
     
     
                              </table></td>
                            </tr>
                            <tr>
                              <td height="22">&nbsp;</td>
                            </tr>
     
     
     
                            <tr>
                                <td colspan="4" class="error"></td>
                            </tr>
     
     
                            <tr>
                              <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td colspan="2" class="TexteErreur" id="error_genInscription1"></td>
                            </tr>
                            <tr>
                              <td></td>
                                <td height="26"></td>
                                <td colspan="2">
    							<input type="submit" name="submit" id ="submit" value="Register"  />
    						 </td>
     
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                                <td height="19">&nbsp;</td>
                                <td colspan="2">							</td>
                            </tr>
     
     
     
     
     
     
     
    </form>
     
     
    </body>
    </html>

  2. #2
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    500 lignes de code il fallait oser, je passe la présentation.

    Est-ce que tu peux produire le code minimal permettant de reproduire ton problème ?
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  3. #3
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Février 2013
    Messages
    21
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Février 2013
    Messages : 21
    Points : 16
    Points
    16
    Par défaut
    Bonjour,
    Désolée, j'ai mis tout mon code parce que selon où je positionne les infos pour récupérer le captcha je n'ai pas les mêmes réponses. Je galère sur le problème depuis pas mal de temps et j'espérais avoir de l'aide
    J'ai essayé de synthétiser un petit peu...
    Merci


    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
    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
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
     
    <?php
    	 session_start();
    	 define('IN_PHPBB', true);
         $phpbb_root_path =  './wordpress/Forum/';
         $phpEx = substr(strrchr(__FILE__, '.'), 1);
    	 include($phpbb_root_path . 'common.' . $phpEx);
    	 require($phpbb_root_path . 'includes/functions_user.' . $phpEx);
    	 $user->session_begin();
    	 $auth->acl($user->data);
    	 $user->setup('ucp');
     
    	 $messageClient = '';
    	 $sujet = '';
    	 $message = '';
     
     
    	$error = array();
    	$data = array(
    		'username'			=> utf8_normalize_nfc(request_var('username', '', true)),
    		'password'			=> request_var('password', '', true),
    		'password_confirm'	=> request_var('password_confirm', '', true),
    		'email'				=> strtolower(request_var('email', '')),
     
    	);
     
     
     
    if (isset($_POST['submit'])) 
    {
    	$error = validate_data($data, array(
    		'username'			=> array(
    			array('string', false, $config['min_name_chars'], $config['max_name_chars']),
    			array('username', '')),
    		'password'		=> array(
    			array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
    			array('password')),
    		'password_confirm'	=> array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
    		'email'				=> array(
    			array('string', false, 6, 60),
    			array('email')),
     
     
    	));
    	$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
     
     
    	//ajout captcha
    if ($config['enable_confirm'])
    {
    	include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
    	$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
    	$captcha->init(CONFIRM_REG);
    }
    //
     
     
    	if (!sizeof($error))
    	{
    		if ($data['password'] != $data['password_confirm'])
    		{
    			$error[] = $user->lang['NEW_PASSWORD_ERROR'];
    		}
    	}
     
     
     
     
     
     
    	if (!sizeof($error))
    	{
    		$group_name =  'REGISTERED';
    		$sql = 'SELECT group_id
    					FROM ' . GROUPS_TABLE . "
    					WHERE group_name = '" . $db->sql_escape($group_name) . "'
    						AND group_type = " . GROUP_SPECIAL;
    		$result = $db->sql_query($sql);
    		$row = $db->sql_fetchrow($result);
    		$db->sql_freeresult($result);
    		if (!$row)
    		{
    			trigger_error('NO_GROUP');
    		}
    		$group_id = $row['group_id'];
     
    		$_SESSION['email']	= strtolower(request_var('email', ''));
     
    		$user_row = array(
    			'username'				=> $data['username'],
    			'user_password'			=> phpbb_hash($data['password']),
    			'user_email'			=> $_SESSION['email'],
    			'group_id'				=> (int) $group_id,
    			'user_timezone'			=> (float) $config['board_timezone'],
    			'user_dst'				=> $config['board_dst'],
    			'user_lang'				=> basename($user->lang_name),
    			'user_type'				=> USER_NORMAL,
    			'user_actkey'			=> '',
    			'user_ip'				=> $user->ip,
    			'user_regdate'			=> time(),
    			'user_inactive_reason'	=> 0,
    			'user_inactive_time'	=> 0,
    		);
    		$user_id = user_add($user_row);
    		if ($user_id === false)
    		{
    			trigger_error('NO_USER', E_USER_ERROR);
    		}
     
     
     
    		if(isset($_POST) && isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
    	if(!empty($_POST['username']) && !empty($_POST['email']) && !empty($_POST['password'])){
     
     
     
            echo "<script>alert('". "A confirmation email has been sent to the following address: " . $email_client  . "');</script>";
     
     
    	}
    }	
     
     
     
     
     
    		////-------------- AUTO - LOGIN --------------------------------------////
     
    	// Basic parameter data
     
    	$user->lang['ACCOUNT_ADDED_AUTOLOGIN'] ='';
    	$user->lang['ACCOUNT_ADDED_LOGIN_SUCCESS'] ='';
     
    	$id 	= request_var('i', '');
    	$mode	= request_var('mode', '');
    	$message = $user->lang['ACCOUNT_ADDED_AUTOLOGIN'];
    					$auto_login = true;
     
    	if (in_array($mode, array('login', 'logout', 'confirm', 'sendpassword', 'activate')))
    		{
    			define('IN_LOGIN', true);
    		}
     
     
     
    		if ($auto_login)
    				{
    					$result = $auth->login($data['username'], $data['password'], true, true, 0);
    					if ($result['status'] != LOGIN_SUCCESS)
    					{
    						$err = $user->lang[$result['error_msg']];
    						if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD')
    						{
    							$err = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
    						}
    						$message = $message . '<br />' . sprintf($user->lang['ACCOUNT_ADDED_LOGIN_FAILED'], $err);
    					}
    					else
    					{
    						$message = $message . '<br />' . sprintf($user->lang['ACCOUNT_ADDED_LOGIN_SUCCESS'], $data['username']);
    						$auth->acl($user->data);
    					}
    				}
     
     
     
     
    		$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
    				trigger_error($message);
     
     
     
     
    		//ajout captcha
    	if ($config['enable_confirm'])
    	{
    		$vc_response = $captcha->validate($data);
    		if ($vc_response !== false)
    		{
    			$error[] = $vc_response;
    		}
     
    		if ($config['max_reg_attempts'] && $captcha->get_attempt_count() > $config['max_reg_attempts'])
    		{
    			$error[] = $user->lang['TOO_MANY_REGISTERS'];
    		}
    	}
    	//
     
     
     
    	//ajout captcha
    		if ($config['enable_confirm'])
    		{
    			$captcha->reset();
    		}
    		$url = append_sid('./index.php');	
     
     
     
    			die( '<html>
    			<head>
    				<META http-equiv="Refresh"
    				content="10; URL=' . $url . '">
    			</head>
    			<body>
    			Votre compte a été enregistré avec succès<br />
     
     
     
    			Vous allez être maintenant redirigé vers <a href="' . append_sid('http://localhost/testLocal/wordpress/Forum/index.php') . '">la page d\'index</a>
     
     
     
     
     
    			</body>
    		</html>');
    	}
    }
    echo '<html>
    <head>
    	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    	<title>Vous enregistrer</title>
    </head>
    <body>
    	<form method="post">';
     
    	//ajout patcha
    if ($config['enable_confirm'])
    {
    	$confirm_id = $captcha->confirm_id;
    	$confirm_code = true;
    	$confirm_image='<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&amp;confirm_id=' . $confirm_id . '&amp;type=' . CONFIRM_REG) . '" alt="" title="" />';
    }
     
     
    if (sizeof($error))
    {
    	echo '<font color="red"><b>' . implode('<br />', $error) . '</b></font>';;
     
    }
     
     
     
    ?>
     
     
     
     
     
     
    <div id="ContInscription2">
      <table>
     
                            <tr>
                                <td colspan="4" ></td>
                            </tr>
     
     
                            <tr>
                                <td colspan="4" ></td>
                            </tr>
     
                            <tr>
                                <td colspan="4" class="error2"></td>
                            </tr>
     
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="3">
     
     
     
    						  <table>
     
                                <tr>
                                  <td >Register on the FORUM </p>
                                    </td>
                                  <td width="156">&nbsp;</td>
                                </tr>
                              </table>						  </td>
                            </tr>
     
                            <tr>
                              <td width="4">&nbsp;</td>
                              <td width="184">&nbsp;</td>
                              <td colspan="2">&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td><strong>Pseudonym: </strong></td>
                              <td><input type="text" tabindex="1" name="username" class="loginRemplissage" size="25" value="<?php echo $data['username']; ?>" /><span id="error_emailInscription1" class="error">*</span></td>
                              <td>&nbsp;</td>
                            </tr>
     
                            <tr>
                              <td>&nbsp;</td>
                              <td><table width="644" border="0" cellspacing="0" cellpadding="0">
     
                                <tr>
                                  <td >&nbsp;</td>
                                  <td align="left" valign="top" style="background-color:#ffffff;"></td>
                                  <td style="color: #3779aa;font-family: Arial,Helvetica,sans-serif;font-size: 10px;font-weight: normal;margin: 0 10px 0 4px;padding: 0;text-align: justify;">The length must be between 3 and 20 characters.</td>
                                  <td>&nbsp;</td>
                                </tr>
                                <tr>
                                  <td >&nbsp;</td>
                                  <td width="144" align="left" valign="top" style="border-top: 1px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 0px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="border-top: 1px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td>&nbsp;</td>
                                </tr>
     
                                <tr>
                                  <td width="40" style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;"><label for="email" class="TexteLogin">E-mail: </label></td>
                                  <td width="374" style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9;background-color:#f2f8fd;"><input id="emailInscription1" tabindex="4" name="email" type="text" class="loginRemplissage" SIZE="40" maxlength="100" value="<?php echo $_SESSION['email']; ?>"/>
                                  <span id="error_emailInscription1" class="error">*</span></td>
                                  <td width="86">&nbsp;</td>
                                </tr>
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;"><label for="password" class="TexteLogin">My password: </label></td>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9;background-color:#f2f8fd;">
    	<input type="password" tabindex="2" name="password" size="25" class="loginRemplissage" value="<?php echo $data['password']; ?>" />						  
     
     
    							  <span id="error_emailInscription1" class="error">*</span></td>
                                  <td>&nbsp;</td>
                                </tr>
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;"> <label for="pass_confirm" class="TexteLogin">Confirm password: </label></td>
                                  <td style="background-color:#f2f8fd;border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9;">
     
    				<input type="password" tabindex="3" name="password_confirm" class="loginRemplissage" size="25" value="<?php echo $data['password_confirm']; ?>" />			  
     
     
     
    							  <span id="error_emailInscription1" class="error">*</span></td>
                                </tr>
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;border-top: 0px solid #C5D8E9; border-bottom: 0px solid #C5D8E9; border-right: 1px solid #C5D8E9; border-left: 0px solid #C5D8E9;">&nbsp;</td>
                                </tr>
     
     
    <?php
    if ($confirm_code)
    {
    ?>										
     
     
                                <tr>
     
     
    							  <td><?php echo $user->lang['CONFIRM_CODE'] . '<br />' . $user->lang['CONFIRM_CODE_EXPLAIN']; ?></td>
          <td><input type="hidden" name="confirm_id" value="<?php echo $confirm_id; ?>" /><?php echo $confirm_image; ?></td>
       </tr>
       <tr>
          <td>&nbsp;</td>
          <td><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" /></td>
     
    <?php
    }
    ?>
                                </tr>
     
     
     
    <?php
    /*}*/
     
    ?>							
     
     
                                <tr>
                                  <td style="border-top: 0px solid #C5D8E9; border-bottom: 1px solid #C5D8E9; border-right: 0px solid #C5D8E9; border-left: 1px solid #C5D8E9; background-color:#f2f8fd;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;border-bottom: 1px solid #C5D8E9;">&nbsp;</td>
                                  <td style="background-color:#f2f8fd;border-bottom: 1px solid #C5D8E9;border-right: 1px solid #C5D8E9;"><span class="error">*</span> <span class="error">Must be  filled </span> </td>
                                  <td>&nbsp;</td>
                                </tr>
     
     
     
                              </table></td>
                            </tr>
                            <tr>
                              <td height="22">&nbsp;</td>
                            </tr>
     
     
     
                            <tr>
                                <td colspan="4" class="error"></td>
                            </tr>
     
     
                            <tr>
                              <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td colspan="2" class="TexteErreur" id="error_genInscription1"></td>
                            </tr>
                            <tr>
                              <td></td>
                                <td height="26"></td>
                                <td colspan="2">
    							<input type="submit" name="submit" id ="submit" value="Register"  />
    						 </td>
     
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                                <td height="19">&nbsp;</td>
                                <td colspan="2">							</td>
                            </tr>
     
     
     
     
     
     
     
    </form>
     
     
    </body>
    </html>

  4. #4
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    Avoir de l'aide certes mais se relire 500 lignes de code ...
    En plus il n'est même pas correctement indenté et il y a des zones de lignes vides, ce qui complique encore plus la lecture.
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  5. #5
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Février 2013
    Messages
    21
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Février 2013
    Messages : 21
    Points : 16
    Points
    16
    Par défaut
    Je sais bien que j'ai mis tout le code, mais je ne suis pas experte et je ne sais pas où est mon erreur ? Si je ne poste pas, comment pourrai-je progresser ? Mon code est sale, c'est vrai mais je ne maîtrise pas la partie prog de phpbb qu'il a fallu que je rajoute pour faire fonctionner le login.
    Merci en attendant

    Je pense que l'erreur se situe dans cette partie de 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
     
    if (isset($_POST['submit'])) 
    {
    	$error = validate_data($data, array(
    		'username'			=> array(
    			array('string', false, $config['min_name_chars'], $config['max_name_chars']),
    			array('username', '')),
    		'password'		=> array(
    			array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
    			array('password')),
    		'password_confirm'	=> array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
    		'email'				=> array(
    			array('string', false, 6, 60),
    			array('email')),
     
     
    	));
    	$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
     
     
    	//ajout captcha
    if ($config['enable_confirm'])
    {
    	include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
    	$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
    	$captcha->init(CONFIRM_REG);
    }
    //
     
     
    	if (!sizeof($error))
    	{
    		if ($data['password'] != $data['password_confirm'])
    		{
    			$error[] = $user->lang['NEW_PASSWORD_ERROR'];
    		}
    	}
     
     
     
     
     
     
    	if (!sizeof($error))
    	{
    		$group_name =  'REGISTERED';
    		$sql = 'SELECT group_id
    					FROM ' . GROUPS_TABLE . "
    					WHERE group_name = '" . $db->sql_escape($group_name) . "'
    						AND group_type = " . GROUP_SPECIAL;
    		$result = $db->sql_query($sql);
    		$row = $db->sql_fetchrow($result);
    		$db->sql_freeresult($result);
    		if (!$row)
    		{
    			trigger_error('NO_GROUP');
    		}
    		$group_id = $row['group_id'];
     
    		$_SESSION['email']	= strtolower(request_var('email', ''));
     
    		$user_row = array(
    			'username'				=> $data['username'],
    			'user_password'			=> phpbb_hash($data['password']),
    			'user_email'			=> $_SESSION['email'],
    			'group_id'				=> (int) $group_id,
    			'user_timezone'			=> (float) $config['board_timezone'],
    			'user_dst'				=> $config['board_dst'],
    			'user_lang'				=> basename($user->lang_name),
    			'user_type'				=> USER_NORMAL,
    			'user_actkey'			=> '',
    			'user_ip'				=> $user->ip,
    			'user_regdate'			=> time(),
    			'user_inactive_reason'	=> 0,
    			'user_inactive_time'	=> 0,
    		);
    		$user_id = user_add($user_row);
    		if ($user_id === false)
    		{
    			trigger_error('NO_USER', E_USER_ERROR);
    		}
     
     
     
    		if(isset($_POST) && isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
    	if(!empty($_POST['username']) && !empty($_POST['email']) && !empty($_POST['password'])){
     
     
     
            echo "<script>alert('". "A confirmation email has been sent to the following address: " . $email_client  . "');</script>";
     
     
    	}
    }

  6. #6
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Février 2013
    Messages
    21
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Février 2013
    Messages : 21
    Points : 16
    Points
    16
    Par défaut
    Bonsoir,

    Personne pour m'aider ?

    J'ai essayé de modifier mon code et de le synthétiser pour qu'il soit plus digeste. Lorsque je teste, j'ai cette erreur "The confirmation code you entered was incorrect." qui apparait même si le bon code captcha est rentré. J'ai du rajouté une partie de code pour forcer le login du nouvel utilisateur lorsqu'il vient de s'enregister pour qu'il soit automatiquement loggué. C'est peut-être cette partie de code qui pose problème.

    Pouvez-vous m'aider ? Merci beaucoup

    Merci en attendant mon code

Discussions similaires

  1. Captcha sur formulaire
    Par altordj dans le forum Langage
    Réponses: 11
    Dernier message: 07/02/2013, 19h55
  2. Publier sur son mur depuis un autre site
    Par Coussati dans le forum Facebook
    Réponses: 3
    Dernier message: 22/08/2011, 16h03
  3. [phpBB] Inscription au forum phpBB
    Par breizhgen dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 2
    Dernier message: 27/02/2007, 19h18
  4. [forum] phpbb sur OVH
    Par Arnaud F. dans le forum OVH
    Réponses: 13
    Dernier message: 03/07/2006, 19h05
  5. [phpBB] Réutiliser les classes du forum phpBB sur son site
    Par SebOmaX dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 14
    Dernier message: 21/05/2006, 23h19

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