I am really new to php and i am editing a website set up that I downloaded and there is something wrong with a redirect function, it is used when you log into the site to redirect you to the main page after logging in.
what it does is it sits on a page sayign in plain text “redirecting you to URL-HERE” and fails to redirect.
here is the code:
function redirect($linkto,$type=0,$wait_sec=0){
if($linkto){
if($type==0){
global $redirect;
$redirect = '<meta http-equiv="refresh" content="'.$wait_sec.';url='.$linkto.'" >';
}else{
header("location:".$linkto);
exit('redirecting to: '.$linkto);
}
}
}