I am not quite sure how to ask this, currently I am doing form field validation by IF THEN statements and if all fields are filled then I run a simple mail script I would like to separate the mail script for better lead tracking so I need field validation and then if all fields are filled I need it to go to a separate mail.php script Is this possible?
Yes it is. The best why to do your form validation is by using javascript and then if the form fields are valid then submit the form to mail.php. Here's an example; Note the submit button type="button" and not type="submit".
yes, it is possible... if i understand correctly this is the solution: to check the "field" is not empty just use if(isset($_POST['field'])){ this is a bit easier. and to use a seperate mail.php function just use require_once ("mail.php"); function. and if you try to do this in a safe way just add a variable $security="something" and start your mail.php function with if($security=="something") { all the content} else {echo "get out of here ";}
i guess i dont understand how to add the security variable if i was using the require_once ("mail.php"); because it it not a GET URL