Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End php form issue Reply To: php form issue

#176703
__
Participant

header(“Location: thanks.html”);

I don’t see this header after submitting the form. Something might be happening before it is set —does sending the mail work correctly? do you have error reporting enabled?

This probably isn’t the cause of your immediate problem, but note that Location headers must use a fully qualified URL.

header( 'Location: http://example.com/thanks.html' );

Relative paths might work in many cases, but it is less reliable and will not work at all in some browsers.

Also, please do not “dump” code on the forums. It is very difficult to read/navigate through and discourages people from trying to help. Small amounts of code necessary to describe a problem are fine, but make sure you use code blocks so they are properly formatted. If you need to share large amounts of code, use codepen or make a gist on github.