php header redirect after else语句

时间:2014-02-24 09:03:43

标签: php redirect if-statement header

    include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';
            $securimage = new Securimage();

            if($regform_coorname == "" || $regform_coorphoneno == "" || $regform_cooremail == ""){
                $thirdstepregerror = 'Please enter all the required fields!';
            }elseif(!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $regform_cooremail)){
                $thirdstepregerror = "Please enter a valid email address!";
            }elseif ($securimage->check($regform_captcha) == false) {
                $thirdstepregerror = "The captcha code entered was incorrect!";
            }else{
                header( 'Location: ../registration-submitted/' ) ;
                exit;
            }

大家,我有上面的代码重定向成功注册后重定向用户。但标题重定向不起作用。但是,如果我删除securimage验证码包括重定向工作,但我需要securimage验证码。我用过ob_start();功能在页面顶部之后

0 个答案:

没有答案