With respect to the editor best suited to PHP, that's entirely at your discretion. I use Notepad++ to write all my code in, but some people use plain old notepad. Dreamweaver is an option, but it's not a good IDE in my opinion. It has a heavy, sluggish feeling to me and it also has annoying features that bug me such as auto code completion (which I know can be switched off) and annoying pop-up boxes that get right in the way of your code as your writing it. Dreamweaver is more of a designers tool to knock up websites without having to know too much about HTML/CSS.
Hi, thanks for your reply, I'll try to edit and add code tags right away.
The form, fieldset and div are closed on the html I posted. I received the mail you sent, can you tell me what else may be wrong?
This is where I close the tags:
</fieldset></form><br class="clear" /><span class="error" id="name_error">Please input your name !</span><span class="error" id="email_error">Please input your mail !</span><span class="error" id="email_error2">Please use a valid !</span><span class="error" id="msg_error">Por Favor completa tu mensaje !</span></div>
This is my HTML head, do I have to include something else for the function to work?
//=================================== MAIN MENU ===================================//
minWidth : 12, // requires em unit.
maxWidth : 14, // requires em unit.
extraWidth : 3 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
// due to slight rounding differences and font-family
}).superfish(); // call supersubs first, then superfish, so that subs are
// not display:none when measuring. Call before initialising
// containing tabs for same reason.
Sorry about that. I was in a rush to leave for work when I tested your code and didn't copy & paste it properly. Consider my first message void. Upon further inspection, I actually don't see any problems with your code. I've tested it a number of times now and it works as expected.
In your first message you said it does absolutely nothing, but didn't elaborate on this. When you click the submit button, does your browser get redirected to js/process.php? This would be expected behaviour. If it does redirect, does your code display your warning message, or simply do nothing at all? If it does nothing, this would suggest the function executes correctly.
Consider writing a test script like this:
mail('email@example.com', 'Test subject', 'Message') or die('Error');
If the mail function still does not work, it could be a problem with your web hosting. At this point you would need to contact the host and ask them if SMTP is supported, since they may not have it installed, though this is unlikely.
Regarding your questions about testing code, I just save the files and upload them to a folder on my web server where I run them. No special folder structure is necessary. Most files reside in public_html or www.
It may be a long shot, but I've had issues with submit buttons in the past where I've given the name, type, id and other attributes the same name (all "submit") and the functionality of the button was disabled. Incidentally, the submit button doesn't need a name attribute.
It should make no difference what the file extension is. In cases where the problem is not forthcoming, I like to isolate the code in question and test it externally. Try copying just the code you need to test into a new file, along with your PHP handler in another, and see if it still does nothing.
If it works, you can assume something else in your source file(s) is affecting the functionality of the button. If it still does not work, I don't know what that could be.