Re: RedirectING (asp) by PHP? - Mailing list pgsql-php

From David Busby
Subject Re: RedirectING (asp) by PHP?
Date
Msg-id 003f01c356c0$1cb7c120$1100000a@busbydev
Whole thread Raw
In response to RedirectING (asp) by PHP?  ("esrefatak" <esrefatak@hotmail.com>)
List pgsql-php
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?







pgsql-php by date:

Previous
From: "esrefatak"
Date:
Subject: Re: RedirectING (asp) by PHP?
Next
From: Josh Berkus
Date:
Subject: Re: [NOVICE] Accessing Postgres db from apache using PHP