First post at this website. Hopefully someone can help. I think it's something simple but I have been staring at the problem for hours and hours and can't see for looking. Please can someone look at the code and tell me what's wrong.
Rather than making potential helpers download code, you may get more help by:
1. Posting the relevant PHP code directly in a reply here within the forum's [php]...[/php] tags.
2. If relevant to the problem, also post the form mark-up here within[html]...[/html] or [code]...[/code] tags.
3. Describe the actual symptoms of the problem: Are there any error messages displayed or in the PHP error log? What happens that should not happen. What does not happen that should happen? (It "isn't working correctly" does not give a debugger much to go on.)
4. If you've taken any debugging steps yourself in terms of inspecting variable or such, let us know what you've found.
Oh, and welcome to the forum!
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
"This contact form isn't working correctly" and "please tell me what's wrong" - without you telling us what the symptoms are? Seriously?
Hold on, let me get my psychic mirror ball and consult my spirit guide. Okay, I'm back.
I know, magically, that you're running an Apache web server 2.2.6 and Fedora flavor of Linux. As each time I submit the form I am prompted to download your PHP file, this means an file ending with that extension is not parsed by PHP, rather treated as any other file you'd download normally.
The most likely cause of this is an improper Apache setup. This means adjusting the Apache config (usually httpd.conf) either in the global config area or your virtual host setup for your domain as follows:
If you run PHP5, this means something like this (adjust path line 1):
Example only. The first line depends on how PHP5 was compiled, but the second line is tells Apache any file ending in .php is to be parsed using PHP5.
PHP4 is handled differently and some webhosts install PHP as a CGI which is not recommended. But the above is a common configuration taking into consideration the multitude of ways PHP and Apache can work together under Linux. Remember, after making any httpd.conf changes, restart Apache for the change to take effect.
This advice is generic and depends on how PHP and Apache was installed - consult your webhost or knowledgeable system administrator (don't bug me, or my spirit guide) as to exactly what to do and how to do it.
Sorry my original post was useless. New to this type of forum and wasn't sure what info to give. I will continue to work on it today. Thanks for the replys and if I will report back with a lot more detail