Thanks jazzman1 , that works.
but i can't get the logic.
The submit method submits the specified form as if a submit element (button) was pressed. But the problem is that you also have in the form a submit object element whose property name is using the same name (submit). So, when you set a property name to submit (it doesn't matter which type of the form), you override the submit() function on the form.
@To the 2nd question, most likely you need to change if(isset($_POST['submit'])) to if(isset($_POST['send'])), where $_POST('send') is the name of the submit button.
Edited by jazzman1, 05 April 2014 - 12:02 AM.