Thread: RedirectING (asp) by PHP?

RedirectING (asp) by PHP?

From
"esrefatak"
Date:
 
Hi,
 
"redirect" command in PHP?
 
 
 
 
 

Re: RedirectING (asp) by PHP?

From
"Duncan Adams (DNS)"
Date:
header("location:URL");
 
there must be noting send to the web page before this (not even a white space) or u will get an error. if u have to send something first use javascript to redirect
 
some thing like
 
<script>
    location.href="url"
</script>
 
-----Original Message-----
From: esrefatak [mailto:esrefatak@hotmail.com]
Sent: Wednesday, July 30, 2003 12:34 PM
To: pgsql-php@postgresql.org
Subject: [PHP] RedirectING (asp) by PHP?

 
Hi,
 
"redirect" command in PHP?
 
 
 
 
 
“This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.net/legal/email.asp "

Re: RedirectING (asp) by PHP?

From
"esrefatak"
Date:
 
Thank you.
You tired me via your reply. :)
I received just 4 number reply. :)
Again thanks
 
----- Original Message -----
Sent: Wednesday, July 30, 2003 2:03 PM
Subject: Re: [PHP] RedirectING (asp) by PHP?

header("location:URL");
 
there must be noting send to the web page before this (not even a white space) or u will get an error. if u have to send something first use javascript to redirect
 
some thing like
 
<script>
    location.href="url"
</script>
 
-----Original Message-----
From: esrefatak [mailto:esrefatak@hotmail.com]
Sent: Wednesday, July 30, 2003 12:34 PM
To: pgsql-php@postgresql.org
Subject: [PHP] RedirectING (asp) by PHP?

 
Hi,
 
"redirect" command in PHP?
 
 
 
 
 
“This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.net/legal/email.asp "

Re: RedirectING (asp) by PHP?

From
"David Busby"
Date:
I use this

// redirect ***************************************************************
// Redirects to relative URL
function redirect($to)
{
  $schema = $_SERVER['SERVER_PORT']=='443'?'https':'http';
  $host =
strlen($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:$_SERVER['SERVER_NAME'];
  if (headers_sent()) return false;
  else
  {
    header("Location: $schema://$host$to");
    exit();
  }
}

----- Original Message -----
From: "esrefatak" <esrefatak@hotmail.com>
To: <pgsql-php@postgresql.org>
Sent: Wednesday, July 30, 2003 03:34
Subject: [PHP] RedirectING (asp) by PHP?



Hi,

"redirect" command in PHP?