
thanks.php is not opening I'm using MAMP and atom text editor please help me...
Try Location (uppercase L). Oh, and you don't really need the exit if there is no code that follows.
Oh, one more thing... if this is the only thing in your file, toss the closing ?>. Any time you have that with a line after it, at the end of the file it will not work properly. You can have it if it is the very last line, but I see you have a blank line after it. So, either remove the blank line, or remove the closing ?>. This problem will drive you nuts. It's a really stupid nuance of the language.
Try replacing header("location: thanks.php") on line 11 with echo "<script> window.location = 'thanks.php';</script>" to force a location change