Hello Php Expert,
I need help on my current client project. I have made landing page with contact form which is working fine. But after form submission i want the page to redirect to thanks page..
http://ebusinessbpo.com/cebucallcenter/index.html
After submit it should redirect to this page
http://ebusinessbpo.com/cebucallcenter/thankyou.html
I have tried many things with using header etc..but still no solutions..plz help its urgent... my code as below...
<?php /* ============================================== Settings ============================================== */ define("MAILTO" , "jj@xyz.com"); define("SUBJECT" , "xyz- landing page query"); define("ERROR_MESSAGE" , "Error sending your message"); define("SUCCESS_MESSAGE" , "Message Sent"); /* ============================================== Email Sender ============================================== */ /* create email message */ $message = ''; // Name $message .= 'Name : ' . $_POST['name'] . "\r\n"; // Email $message .= 'Email : ' . $_POST['email'] . "\r\n"; // Phone $message .= 'Phone : ' . $_POST['phone'] . "\r\n"; // Address $message .= 'Address : ' . $_POST['address'] . "\r\n"; // Company $message .= 'Company : ' . $_POST['company'] . "\r\n"; function validateEmail($email) { if(preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email)) return true; else return false; } if((strlen($_POST['name']) < 1 ) || (strlen($_POST['email']) < 1 ) || validateEmail($_POST['email']) == FALSE ) { echo( ERROR_MESSAGE ); } else { if( mail( MAILTO , SUBJECT , $message , "From: ".$_POST['name']." <".$_POST['email'].">\r\n" ."Reply-To: ".$_POST['email']."\r\n" ) ) { echo( SUCCESS_MESSAGE ); } else { echo( ERROR_MESSAGE ); } } ?>