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

Home Forums Back End Contact Form help Reply To: Contact Form help


I’m new to this whole forum thing.

No problem. Keep in mind that it is very difficult to tell what mood people are in just by reading their comments, so it’s very easy to jump to the conclusion that they’re being mean. Of course, this effect is amplified if you’re already upset/frustrated. It’s best to imagine that they meant what they wrote in the best possible way (even if you’re sure that they didn’t).

At the top of your PHP script, add the following:

error_reporting( -1 );
ini_set( 'display_errors',1 );

…then see if you get any error messages.

I’ve never used pastebin or gist on github, so apologies if this gist isn’t in the most optimal format

It’s great. So, next suggestion is to add some output after your call to mail(). Right now, you just have <meta> redirects*, so (since those pages may or may not be set up at this point) you may not get a good indication if it is successful or not. Something like

if ($success){
    print "success";
    print "failure";

is better for testing.

* actually, there is no reason to use <meta> redirects at all. PHP has a header function that can do an actual http redirect, which will always be more reliable.

The most specific I can be is that only the javascript works now upon hitting the submit button(it didn’t before I I fixed the capitalization issue and added the name attribute).

Try removing the javascript for the time being. It may be preventing you from seeing what the PHP is doing (in fact, it may be preventing the PHP from doing anything in the first place).

I have WAMP running on my machine but it’s my understanding that the PHP script will execute but not actually send if you run it locally.

It will, if you have a mail server set up to listen to PHP. It’s just that most people don’t. mail doesn’t actually send email; it just looks for a mail server that it can submit the email message to. (It has no idea what happens after that.) If it doesn’t find one, “oh, well.”