Re: [PHP] PHP jump to other page

2006-10-05 Thread Ivo F.A.C. Fokkema
On Thu, 05 Oct 2006 09:16:17 +0800, Penthexquadium wrote:

 On Thu, 5 Oct 2006 01:17:41 +0700, Groundhog [EMAIL PROTECTED] wrote:
 
 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
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 if (!statement) {
 header('Location: index2.php');
 exit;
 }
 // other codes...

It's recommended (HTTP/1.1 standard requirement) to use a full absolute
path.

header('Location: http://' . $_SERVER['HTTP_HOST'] .
rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/index2.php');

Ivo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP jump to other page

2006-10-05 Thread Richard Lynch
On Wed, October 4, 2006 1:17 pm, Groundhog wrote:
 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
  require 'index2.php';
  exit;

}

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP jump to other page

2006-10-04 Thread Groundhog

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP jump to other page

2006-10-04 Thread Jo�o C�ndido de Souza Neto
In other hand, if you sent any character yet, you can use.

IF (statement == TRUE)
stay on this page, index.php
ELSE
   echo script language=\javascript\window 
location=\index2.php\;/script;


AraDaen [EMAIL PROTECTED] escreveu na mensagem 
news:[EMAIL PROTECTED]
 If you have not sent any character till that moment, you can use:

 IF (statement == TRUE)
   { stay on this page, index.php }
 ELSE {
 header(Location: index2.php);




 cya 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP jump to other page

2006-10-04 Thread Penthexquadium
On Thu, 5 Oct 2006 01:17:41 +0700, Groundhog [EMAIL PROTECTED] wrote:

 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
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

if (!statement) {
header('Location: index2.php');
exit;
}
// other codes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php