Re: [PHP-DB] redirecting to a page

2003-05-31 Thread Ronan Chilvers
Comments inline ...

On 30 May,2003 at 10:25 Hutchins, Richard wrote:

> Redirect(www.mypage.com);
> 


You'll need "" around the url I reckon as in

Redirect("www.mypage.com");

;-)

Ronan
e: [EMAIL PROTECTED]
t: 01903 739 997
w: www.thelittledot.com

The Little Dot is a partnership of
Ronan Chilvers and Giles Webberley

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] redirecting to a page

2003-05-31 Thread Matthew Horn
Remember, though, you can't set an HTTP header after you've sent output to the client, 
so you needc to do your redirecting (assuming there's a condition) before you display 
ANYTHING.

BAD:
 
  if (somecondition) { Redirect(www.mypage.com); }
  ...

GOOD:
 
  } else {
   Redirect(www.mypage.com);
  }

HTH, 

matt

> -Original Message-
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 30, 2003 10:26 AM
> To: 'Rick Dahl'; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] redirecting to a page
> 
> 
> Redirect(www.mypage.com);
> 
> > -Original Message-
> > From: Rick Dahl [mailto:[EMAIL PROTECTED]
> > Sent: Friday, May 30, 2003 10:23 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] redirecting to a page
> > 
> > 
> > I need to redirect to another page once some scripts that I 
> > can't alter run.  
> > 
> > I have this function at the top of my page: 
> > 
> >  >   function Redirect ($url) {
> >  Header ("Location: " . $url);
> >  exit;
> >   }
> > ?>
> > 
> > How do I call the function?
> > 
> > Rick
> > 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] redirecting to a page

2003-05-31 Thread Hutchins, Richard
Redirect(www.mypage.com);

> -Original Message-
> From: Rick Dahl [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 30, 2003 10:23 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] redirecting to a page
> 
> 
> I need to redirect to another page once some scripts that I 
> can't alter run.  
> 
> I have this function at the top of my page: 
> 
>function Redirect ($url) {
>  Header ("Location: " . $url);
>  exit;
>   }
> ?>
> 
> How do I call the function?
> 
> Rick
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php