Reply to Re: In email form how do we say "must be equal to X"?

Your name:

Reply:


Posted by Pedro Graca on 11/10/06 19:17

["Followup-To:" header set to comp.lang.php.]
Matthew Wilson wrote:
> The actual capture form is
> HTML, only the receive script is PHP. Can you offer a simpler version which
> just expects the number "5" rather than random numbers?
>
> Here is the format we follow, and the relevant field that expects a 5 is
> "human":
>
> <?
> // ------------- CONFIGURABLE SECTION ------------------------

define ( 'SPAMMER_URL', 'http://www.example.com/spammer.html' );
define ( 'SPAMMER_CHECK', '5' );

> // $mailto - set to the email address you want the form
> // sent to, eg
> //$mailto = "youremailaddress@example.com" ;
>
> $mailto =

<snip>

> if (get_magic_quotes_gpc()) {
> $comments = stripslashes( $comments );
> }

### With apologies for using a different code structure
if ( $_POST['human'] != SPAMMER_CHECK ) {
header( "Location: " . SPAMMER_URL );
exit ;
}

> $messageproper =
>
> "This message was sent from:\n" .
> "$http_referrer\n" .
> "------------------------------------------------------------\n" .
<snip>

--
I (almost) never check the dodgeit address.
If you *really* need to mail me, use the address in the Reply-To
header with a message in *plain* *text* *without* *attachments*.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация