Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect without header

Status
Not open for further replies.

Zych

IS-IT--Management
Apr 3, 2003
313
US
Hey people,

Is there a way to redirect in PHP without using header()? I have no idea why this is not working. At first it was because I was sending some HTML before using it. I now have a page only with php code no HTML whatsoever. I am getting the error:

Warning: Cannot modify header information - headers already sent by (output started at C:\ftproot\ in C:\ftproot\ on line 33

Line 33 is the code for header which reads as follows:
header('location: warning.php');

I was using an include statement which worked fine for the most part but I would rather redirect. Any ideas?
 
I figured it out. I had a space before <?php It is always the little things that get you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top