PHP jump to other page

John Mark Walker johnmark at johnmark.org
Wed Oct 4 20:17:43 UTC 2006


Here's how I would do it. YMMV.

<code>

if(...
...
else
{
	header( "Location: http://your.domain.here/your/path/here.php" );
}

</code>

Note that no other data can have been transmitted to the browser  
before sending the header above.

There are other ways to do this. For example, see syntax for "META"  
tags. Just Google "meta refresh" and you'll find several reference  
pages.

-John Mark
Community Development
Hyperic, Inc.
http://www.hyperic.org/blog/

On Oct 4, 2006, at 11:16 AM, Groundhog wrote:

> Dear Friends,
>
> well, I know that this is not PHP forum, but I'm sure there is a lot
> of PHP expert here. So allow me to ask some problem here:
>
> how can I jump to another page after IF..ELSE statement, for example:
>
> IF (statement == TRUE)
>     { stay on this page, index.php }
> ELSE { jump to index2.php}
>
>
> -- 
> Come and Visit My Blog
> http://ubuntu-ku.blogspot.com
>
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users





More information about the ubuntu-users mailing list