header() is the only way to forward/switch to other page ?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

header() is the only way to forward/switch to other page ?

Postby w3irdo » 03. July 2007 10:01

is header() is the only way to forward/switch to other page ?

i am placing it at the very bottom of my php page, after all my "echo" etc.
I have no choice.

Is there any other method ?
w3irdo
 
Posts: 12
Joined: 24. June 2007 18:41

Postby johnd » 03. July 2007 10:48

im guessing your talking about php right?

if so you need to declare headers before browser output
johnd
 
Posts: 17
Joined: 27. June 2007 16:43

Postby w3irdo » 03. July 2007 11:12

yeah.

but is tat the only way?

i have no choice but to put at the bottom.

Is header() the only method that can be used in php ?
w3irdo
 
Posts: 12
Joined: 24. June 2007 18:41

Postby Wiedmann » 03. July 2007 12:04

i have no choice but to put at the bottom.

Why?

i am placing it at the very bottom of my php page, after all my "echo" etc.

It makes really no sense to make a lot of output with echo() and the redirect the user, because the user don't see your echo's.

I think you should redesign your code...
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: header() is the only way to forward/switch to other page

Postby ldivinag » 09. July 2007 10:55

w3irdo wrote:is header() is the only way to forward/switch to other page ?

i am placing it at the very bottom of my php page, after all my "echo" etc.
I have no choice.

Is there any other method ?


what did you have in mind?

automatically switching pages without the user's actions?

or just provide links at the bottom?

HEADER() is a very finicky function. even as small as a "space" has been sent from the server to the client, your php script will fail immediately with the infamous error message...
leo d.
User avatar
ldivinag
 
Posts: 40
Joined: 19. April 2006 04:18


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 48 guests