2 questions:
I am using a PHP/Javascript/HTML Contact Form for a website and it seems to refresh the page whenever I hit the submit button. Is this normal when working with HTML files offline?
When defining $header for "From" and "Reply-To", would they be the same in a contact form? EX: The person submitting is the person sending so they are from and if the web master wishes to reply, it goes to the person who sent it?
Thanks!
You can install something like WAMP or XAMPP (Windows) or MAMP (Mac) to run PHP on your local machine. There are lots of tutorials online to setting these up.
The "From" defines who the originating email is from and the reply-to is who the message will go-to by default when clicking "Reply". These are typically the same values, but can be different if needed
EDIT: One more thing, you can use Test Mail Server Tool when developing locally to grab emails, since your computer likely won't be able to send them out http://www.toolheap.com/test-mail-server-tool/
Since you're asking a generic question, I'll only be able to give you a broad answer.
Submit buttons have a default event handler for when they are being clicked, just like any other element. To prevent this from happening, pass the event to the click handler, and prevent the default handler from happening:
$('submit').on('click', function(event){event.preventDefault();});
The From address is the address of the actual sender. The Reply-To is the address that you will be sending a reply to when you click the Reply button. In a Form that you created yourself, you will have to assign these values in the $header
array by yourself.