Can someone check my code please?

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){
            global $redirect;
            $redirect = '<meta http-equiv="refresh" content="'.$wait_sec.';url='.$linkto.'" >';
            exit('redirecting to: '.$linkto);

u have to define $linkto, currently it is set to “URL-HERE”;

search for a line:
[php]$linkto = “URL-HERE”;[/php]

and replace the URL-HERE with the real url.

the $linkto is fine it shows the url of my site.

have u turns on error_reporting(E_ALL)

Sponsor our Newsletter | Privacy Policy | Terms of Service