floyd8981
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Problem with PHP Header() urlHello,
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,
RobForum: Fixing WordPress
In reply to: Problem with PHP Header() urlMy 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.
Forum: Fixing WordPress
In reply to: Problem with PHP Header() urlHi 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,
RobForum: Fixing WordPress
In reply to: Problem with PHP Header() urlAnyone have any suggestions?