php - Strange found error in codeigniter -


i having strange issue codeigniter. i'm trying check email in registration form can't enter same email in database , i'm getting found error when try redirect error page. has driven me crazy...and it's simple. help, please.

here code i'm working on, in model

public function checkemail(){         $idcheck = $this->db->query('select email user_tbl email  ="'.$_post["email"].'"');          if($idcheck->num_rows() > 0)         {                redirect('home/errorpage');         }else{             redirect('home/');         }        } 

0 found document has moved here. additionally, 302 found error encountered while trying use errordocument handle request. http/1.1 200 ok date: fri, 10 may 2013 01:18:37 gmt content-type: text/html content-length: 1653 connection: keep-alive server: nginx / varnish x-powered-by: php/5.3.13

codeigniter redirect function written in url helper class.

check once, whether have loaded url helper class or not. or check whether redirect function exists or not by

var_dump(function_exists('redirect'));exit; 

and if comes out false add below line, load url helper.

$this->load->helper('url'); 

and try once passing complete url redirect in redirect function, or adding slash in front of "home" "/home"

about redirect functions:-

the redirect function loads local uri specified in first parameter of function call , built using options specified in config file.

the second parameter allows developer use different http commands perform redirect "location" or "refresh".


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -