Re: Email confirmation via sum



"Krustov" <krusty@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:MPG.1df5e2528013f9c198a7d6@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> <comp.lang.php , Kenneth Farmer , kfarmer@xxxxxxxxxxxxxxxxxxxxx>
> <x6Nif.5222$q93.1597157@xxxxxxxxxxxxxxxxxxxxxxxx>
> <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>";}


Thanks for your help.

I'm afraid I don't know how to add it to the form and php script. :(

Here's the form and script again.


----------------------------------------

<HTML>

Enter your email address to subscribe</font><p>
<form method="post"
action="http://www.sitename.org/lists/lhpc-list-news.php";
<input type="text" name="Email" size="20">
<input type="submit" name="Submit" value="Go"></form>

</HTML>

----------------------------------------

<PHP>

<?
if (!isset($Email)) {
header( "Location: http://www.sitename.org/pages.php?page=Thanks"; );
}
elseif (($Email == "")) {
header( "Location: http://www.sitename.org/pages.php?page=Error"; );
}
else {
mail( "recipient@xxxxxxxxxxxx", "New Subscriber",
"[Newsletter] New Subscriber

$Email",

"From: $Email");
mail( "news-subscribe@xxxxxxxxxxxx", "", "","From: $Email");
header( "Location: http://www.sitename.org/pages.php?page=Thanks"; );
}
?>

</PHP>

----------------------------------------


Thanks again to anyone who can help.

Ken

_____________________________________
Kenneth Farmer <>< 336-736-7376





.



Relevant Pages

  • Re: Newsletter Program
    ... > newsletter so it should be able to handle sending lots of emails. ... that from a PHP running off the Web server, from a cron task in ... PHP Classes - Free ready to use OOP components written in PHP ... PHP Reviews - Reviews of PHP books and other products ...
    (alt.php)
  • Re: Newsletter Program
    ... > newsletter so it should be able to handle sending lots of emails. ... that from a PHP running off the Web server, from a cron task in ... PHP Classes - Free ready to use OOP components written in PHP ... PHP Reviews - Reviews of PHP books and other products ...
    (comp.lang.php)
  • Re: sending a newsletter
    ... > I'm setting up a web-page for my boss, including a simple newsletter sent ... Therefore you need to send separate messages to avoid this problem. ... PHP Classes - Free ready to use OOP components written in PHP ... PHP Reviews - Reviews of PHP books and other products ...
    (comp.lang.php)
  • Re: need app to create online newsletter
    ... I give PHP a try. ... If I had clients like that, and I didn't know php, I would just hire someone to design what you need and pass the cost onto the client.But you didn't mention that your getting paid to do this so I'll just move on. ... " text would then be added to that months newsletter. ... The only thing you will need to do is create the newletter from articles people have already posted. ...
    (comp.lang.php)
  • Re: OT - Advice on Sending a Newsletter
    ... This isn't necessary for the newsletter I want to send ... I'm glad you don't consider me to be a geek! ... My web hoster doesn't support PHP. ... > newsletter is being sent too sort of thing. ...
    (uk.media.tv.misc)