Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/06/2007, 20:04
Avatar de geq
geq
 
Fecha de Ingreso: agosto-2006
Ubicación: Rosario
Mensajes: 655
Antigüedad: 17 años, 8 meses
Puntos: 22
Re: problema con código captcha

hola
mira esto es lo que debes poner en tu form:

Código:
<img src="CaptchaSecurityImages.php?width=100&height=40 &characters=5" /><br />
<label for="security_code">Security Code: </label><input id="security_code" name="security_code" type="text" /><br />
es la imagen y el campo para introducir el codigo
luego esto al principio de guest.php

Código:
session_start();

if( isset($_POST['submit'])) {
if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {
// Insert you code for processing the form here, e.g emailing the submission, entering it into a database. 
echo 'Thank you. Your message said "'.$_POST['message'].'"';
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
echo 'Sorry, you have provided an invalid security code';
}
} else {
y luego cerrar la llave ({) que ves que quedo ahi abierta al final (con un } simplemente)

exitos