[pmwiki-users] Using mailform2 with multiple forms on a single site

Benoît DUTILLEUL benoit.dutilleul at googlemail.com
Tue Jan 9 18:55:43 CST 2007


Dear pmwiki addicts,

I had no reply to my question so I bother you again with it. Thanks for
taking a few minutes to read it because I think the answer is rather simple.

Benoit



2007/1/7, Benoît DUTILLEUL <benoit.dutilleul at googlemail.com>:
>
> Dear all,
>
> I've been trying to use the recipe mailform2 to send to an email address
> the data collected from 2 forms on a single website. Here is the piece of
> code I am using and that I can't get to work:
>
> include_once("$FarmD/cookbook/mailform2.php");
> #
> #Application form
> if ($pagename == 'Main.ApplyForPosition') {
> $Mailform2Subject='New volunteer candidate';
> $Mailform2SuccessPage=' Main.SuccessfulVolunteerRegistration';
> $Mailform2FailurePage='Main.VolunteerRegistrationFailure';
> $Mailform2Recipient='me at mydomain.com';
> $Mailform2Text = "First name:" . $_POST['first_name'] . "Last name:" .
> $_POST['last_name'] ;
> #
> #Subscription to the newsletter
> } else {
> $Mailform2Subject='New subscription';
> $Mailform2SuccessPage='Main.SuccessfulRegistration';
> $Mailform2FailurePage='Main.RegistrationFailure';
> $Mailform2Recipient='me at mydomain.com';
> $Mailform2Text = $_POST['username'] . ": " . $_POST['email'] . $FullName;
> }
>
> The script does not work because even if I am on the page
> Main.ApplyForPosition, it goes in the "else".
>
> Can you help me to find the problem?
> Kind regards,
>
> Benoit
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070110/6d51b6a4/attachment.html 


More information about the pmwiki-users mailing list