[PHP] Redirect page

2001-02-20 Thread Rosen
Hi, I have php script and I want to redirect user to different pages. I tryed with header("Location: main.php"); but i receive error: Warning: Cannot add header information - headers already sent by (output started at F:\Inetpub\wwwroot\pernik\go.php:2) in F:\Inetpub\wwwroot\pernik\go.php on

Re: [PHP] Redirect page

2001-02-20 Thread Ben Peter
Rosen, You have to make sure that nothing is output before the header function. Make sure that you neither employ an echo or print before, and have nothing outside of th ephp code (the part enwrapped in ?php or ? and ?), not even whitespace. You critical spot seems to be line 2 in go.php