Jump to content
MakeWebGames

header() alternative


Lithium

Recommended Posts

This is a shout for help, as i got stucked and can't seem to get this going...

header('Location:'.$_SERVER['SERVER_NAME'].'/validate.php?page='.$page.''); - This one errors with "Warning: Cannot modify header information" message.

This one works, yet it briefly messes the layout and is slow

<META HTTP-EQUIV="refresh" CONTENT="0;URL=validate.php?page=<?=$page?>">

document.location.href - this one is not an option.

Also already tried to clean out buffers before redirecting but outcome is the same.

Any ideas?

Link to comment
Share on other sites

  • 1 month later...

Re: header() alternative

That header message usually appears when you have whitespace or content displaying before the header.

The header is announced before the HTML, so the browser can render it. How can it render with HTML to process? It screws it up.

Hope it helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...