[pmwiki-users] A bug in my code

erik burggraaf burggraaferik at gmail.com
Mon Mar 23 16:12:21 CDT 2015


Hi all, would some one be willing to take a look at my code?

Here's the issue.
This morning I installed the mail list form recipe found here.
http://www.pmwiki.org/wiki/Cookbook/MailListForm
The recipe installed just fine.

Once I had it working, I decided to get greedy, because I have two email lists.  I could have created a separate page the way the recipe told me to, and made a second form for the second list, but no, I couldn't be content with that.  I thought it would be much more elegant to offer both lists on one form.  So, I wrote up the new set of radio buttons and put them into the form..  Then I created a new variable called $Choice which I attached to the radio buttons.

Then in config.php I wrote two condition statements that say which administration address is supposed to be used when.

Finally, I wrote a new success message that states what list was operated on and reminds the user to reply to the confirmation email to complete the request.

It's working... Almost.  My success message shows the right list all the time, but my confirmation emails always come from the same list, no matter which radiobutton I check.

I've been working on this for four hours and gotten to the point where I'm starting to look past the code itself and see dancing frosted bottles of beer that arent really there.

ANy help appreciated.

Thanks,

Erik


More information about the pmwiki-users mailing list