Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/10/2008, 16:51
Avatar de EmaD
EmaD
 
Fecha de Ingreso: marzo-2008
Mensajes: 93
Antigüedad: 16 años, 1 mes
Puntos: 2
Respuesta: Problema securimage captcha variable vacia?.

Aver en el form puse asi

Código PHP:
echo '<img id="captcha" src="/securimage/securimageshow.php" alt="CAPTCHA Image" /><br>Ingresar Codigo Imagen:<input type="text" name="captcha_code" size="10" maxlength="6" /><br>'
Y la recojo asi y chekeo.

Código PHP:
$seguridad $_POST['captcha_code'];

if (
$securimage->check($seguridad) == false) {
  
// the code was incorrect
  // handle the error accordingly with your other error checking
echo'<div class="cadre">';
                echo
'<h2>'.MSG_ERRORS.'</h2>';
  
// or you can do something really basic like this
  
die('Codigo De Seguridad Incorrecto <a href="javascript:history.back(1)">Intenta Nuevamente</a>');
echo
'</div>';
}

            else{ 

ingresa los datos a la db

El captcha al parecer trabaja con sessiones.
En las primeras lineas tengo esto
Código PHP:
<?php
error_reporting
(E_ALL); ini_set('display_errors''on'); 
session_start();// aca inicia la session del captcha pero da errror entonecs la saco
echo '<div id="register">';
echo 
'<h1>'.MSG_register.'</h1>';
$website->include_language_definition("modulos/user");
include_once 
$_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';

$securimage = new Securimage();
if(
$website->get_config("allow_registration"))
{
Y me da el error este

Notice: A session had already been started - ignoring session_start() in /home/xxxxx/public_html/modulos/register/register.php on line 3


Osea que ya esta iniciada la session. osea que no me hace falta iniciarla otra vez?

y Los archivos del captcha lo podes bajar desde aca http://www.phpcaptcha.org/latest.zip

Y esta es la guia rapida.
http://www.phpcaptcha.org/documentation/quickstart/

Ya nos e mas que hacer.

Última edición por EmaD; 29/10/2008 a las 16:57