Posted by Krustov on 11/29/05 05:59
<comp.lang.php , Kenneth Farmer , kfarmer@NOSPAM.spyderbyte.com>
<x6Nif.5222$q93.1597157@twister.southeast.rr.com>
<Tue, 29 Nov 2005 00:17:33 GMT>
> I'm not a php guru but I can tinker. Below is one of the newsletter sign-up
> forms. Can someone show me how to add the ability to do what
> EmailBattles.com does with their forms?
>
Too late at night - but this should get you started .
$z1=(rand()%9)+1;
$z2=(rand()%9)+1;
$z3=$z1+$z2;
$z1 + $z2 = <input type="text" name="summ" size="25">
<input type="hidden" name="demo" size="0" value="<?php print $z3; ?>">
On the next page .....
$aaa=$_POST['summ'];
$bbb=$_POST['demo'];
if ($aaa<>$bbb) {print "take a hike spammer <br>";}
[Back to original message]
|