cvs: pearweb /public_html account-mail.php

From: Date: Sat, 14 Aug 2004 15:33:18 +0000
Subject: cvs: pearweb /public_html account-mail.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-22901@lists.php.net to get a copy of this message
danielc Sat Aug 14 11:33:18 2004 EDT Modified files: /pearweb/public_html account-mail.php Log: * Add CAPTCHA stuff to this form. http://cvs.php.net/diff.php/pearweb/public_html/account-mail.php?r1=1.12&r2=1.13&ty=u Index: pearweb/public_html/account-mail.php diff -u pearweb/public_html/account-mail.php:1.12 pearweb/public_html/account-mail.php:1.13 --- pearweb/public_html/account-mail.php:1.12 Fri Aug 13 11:58:38 2004 +++ pearweb/public_html/account-mail.php Sat Aug 14 11:33:18 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-mail.php,v 1.12 2004/08/13 15:58:38 mj Exp $ + $Id: account-mail.php,v 1.13 2004/08/14 15:33:18 danielc Exp $ */ /** @@ -57,6 +57,8 @@ $form->addText('name', 'Y<span class="accesskey">o</span>ur Name:', $data['name'], 40, null, 'accesskey="o"', $th, $td); + $form->addPlaintext('CAPTCHA:', generate_captcha(), + $th, $td); $form->addText('email', 'Email Address:', $data['email'], 40, null, '', $th, $td); @@ -99,6 +101,10 @@ echo '<h1>Contact ' . $row['name'] . '</h1>'; if (isset($_POST['submit'])) { + + if (!validate_captcha()) { + $errors[] = 'Incorrect CAPTCHA'; + } //XXX: Add email validation here if ($_POST['name'] == '') {

« previous php.pear.cvs (#22901) next »