Send mail

Good evening, I want to ask, here I created a form to be filled out by my website visitor and when he clicks send why does the display switch to a blank page and the form is not sent to my email?

Can you please provide me with the website’s link for the issue you are having?

7Elohim Organizer & Planner

It seems like you have some errors with the.htaccess file. When you send the email, it’s sending a post request to process_form.php, but it’s also redirecting to process_form, the same file but without the .php extension. This means your data isn’t passing to that second request. You might have some issues with the url rewriting in the.htaccess file.

2 Likes

To elaborate on this part: POST data is not preserved on a redirect. So if you have a web form that sends POST data to process_form.php, but that that URL redirects to process_form, then the browser will make a GET request to the process_form URL, and the POST data will be lost.

I’m guessing this is the result of some “remove file extension from the URL” .htaccess codes.

The simplest fix is to update your form so it submits the page to the process_form URL (without the .php extension).

Alternatively, you’ll have to tweak your .htaccess rules so it doesn’t strip the .php extension from the URL. But if you still want this to happen for other PHP files, that will become a big mess.

8 Likes

My bad @Admin I forgot to mention that.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.