Hi friends, I am trying to use an custom php script in my website. My aim is to redirect the user to error page when the filled form is empty or with any wrong value. He should go to success page when he filled the form with correct text. The correct text is for example anytext. But i am getting error constantly. Can anyone please check that what the error is and how to correct it? Any help please. Thanks in advance.
Hi! Try This One. <?php // If Your Form Method="post"! U'll Use $_POST Here. // If Method="get"! U'll Use $_Get. // U Can Use $_REQUEST For Both. $answer = $_REQUEST['answer']; if ($answer != "") { header("Location: http://www.domain.com/success"); } else { header("Location: http://www.domain.com/error"); } ?>
I have solved this php error. i have tried to use the database with this script which solved the error. thanks a lot for the replies freinds.