php scripting, stopping script if condition fails

if(strlen($guardians_phone) < 8){
echo ‘ERROR: guardians_phone is too short’;
echo ‘Congratulations!’;

I would like this condition to stop the execution of the form if the answer is false. Would also like to redirect to an html page that would explain to the person why the script failed. Thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service