Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter floyd8981

    (@floyd8981)

    Hello,

    I found a workaround for this issue. I’ve added the code in my php script as a function in the “functions.php” file. I created a page template for my contact form and used a hidden field on the form to determine if the form is being posted. If the hidden value is set, I call the function. If not, I just display the form. Unfortunately, I do have to use the javascript redirect because of the header issue, but at least it is something I can work with.

    Thanks,
    Rob

    Thread Starter floyd8981

    (@floyd8981)

    My apologies, but I’m doing this locally. The form that is on the site now is just a plugin form. I changed it back to the plugin when I realized I was having a problem.

    Thread Starter floyd8981

    (@floyd8981)

    Hi Eric,

    Thanks for the response!

    I did toy with the doing a javascript window.location redirect, but I get the same results. Plus, I’ve found that sending parameters using the javascript redirect has become a pain because of the escape characters. There is php code being executed before the header, but no output that would cause headers to already be sent.

    The reason I decided to post this on the wordpress forum instead of a php forum is because the mailer script works fine when it’s not embedded in the wordpress folder. Once the scripts are run inside wordpress, it always reposts the current script as part of the URL.

    I did attempt to manipulate the path by using various $_SERVER functions, but no matter what I do, “phpmailer2.php” is always appended to the front of my redirect location.

    Should I create a wordpress function inside the functions.php file to process the mail and include that in my “contact” page template? I may try this if I get some time this afternoon. There must be something I’m doing wrong lol. If not, I can’t imagine I would be the only one having this problem.

    Thanks again for your response. I really appreciate it!

    Cheers,
    Rob

    Thread Starter floyd8981

    (@floyd8981)

    Anyone have any suggestions?

Viewing 4 replies - 1 through 4 (of 4 total)