Re: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Jon Farmer

c) and d) are clientside functions if you have already outputted data to the
browser so use Javascript to do them

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key


- Original Message -
From: Simos Varelakis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 17, 2002 12:36 PM
Subject: [PHP] Display a mesagge and redirect (newbie)


 Hi to everyone

 I want to do the following and i dont know if its possible with php code

 a) run a mysql query
 b) display a simpe message
 c) delay few seconds
 d)auto redirect to a page

 can I do this with php
 i know how to do a) and b) and I can't do c) and d)

 note that if i try d) with function header (location URL')  got an error
 for headers already send :-(

 Thanks in advance for your help and time

 Best regards

 simos




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread DL Neil

Alternatively, remember that HTML has this built in (and PHP outputs a HTML page):

move c) before a)
implement it using a meta tag in the HTML page HEAD section
d) will then happen after the defined time period

Regards,
=dn

- Original Message - 
From: Jon Farmer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 17 January 2002 12:42
Subject: Re: [PHP] Display a mesagge and redirect (newbie)


 c) and d) are clientside functions if you have already outputted data to the
 browser so use Javascript to do them
 
 --
 Jon Farmer
 Systems Programmer, Entanet www.enta.net
 Tel 01952 428969 Mob 07763 620378
 PGP Key available, send email with subject: Send PGP Key
 
 
 - Original Message -
 From: Simos Varelakis [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 17, 2002 12:36 PM
 Subject: [PHP] Display a mesagge and redirect (newbie)
 
 
  Hi to everyone
 
  I want to do the following and i dont know if its possible with php code
 
  a) run a mysql query
  b) display a simpe message
  c) delay few seconds
  d)auto redirect to a page
 
  can I do this with php
  i know how to do a) and b) and I can't do c) and d)
 
  note that if i try d) with function header (location URL')  got an error
  for headers already send :-(
 
  Thanks in advance for your help and time
 
  Best regards
 
  simos
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén

I recommend you to use javascript for this one. That way you can make
sure that client sees the message exactly for time you've decided (like
3 seconds).

So:
a) Just do It
b) Just do It
c) JavaScript for this one, launched _after_ page has loaded completely
(use Body onLoad=script() -tag for that)
d) Times up. location.href will take you where you want.


Niklas



-Original Message-
From: Simos Varelakis [mailto:[EMAIL PROTECTED]] 
Sent: 17. tammikuuta 2002 14:37
To: [EMAIL PROTECTED]
Subject: [PHP] Display a mesagge and redirect (newbie)


Hi to everyone

I want to do the following and i dont know if its possible with php code

a) run a mysql query
b) display a simpe message
c) delay few seconds
d)auto redirect to a page

can I do this with php
i know how to do a) and b) and I can't do c) and d)

note that if i try d) with function header (location URL')  got an
error for headers already send :-(

Thanks in advance for your help and time

Best regards

simos



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Intruder

 a) run a mysql query
 b) display a simpe message
 c) delay few seconds
 d)auto redirect to a page


meta http-equiv=refresh content=5; URL=new_page.php

body
 some message goes here !!!
/body


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén

No good, since meta starts counting when page is first opened, so
clients with slow connection might not never see the message. I'd rather
use
body onLoad=setTimeout(\location.href='http://domain.com/page.html',
5000\);
which will execute right after the page is completely loaded and move to
the next page after 5 seconds.


Niklas


-Original Message-
From: Intruder [mailto:[EMAIL PROTECTED]] 
Sent: 17. tammikuuta 2002 15:52
To: Php-General
Subject: RE: [PHP] Display a mesagge and redirect (newbie)


 a) run a mysql query
 b) display a simpe message
 c) delay few seconds
 d)auto redirect to a page


meta http-equiv=refresh content=5; URL=new_page.php

body
 some message goes here !!!
/body


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Intruder

 No good, since meta starts counting when page is first opened, so
 clients with slow connection might not never see the message. I'd rather
 use


what do you mean slow connection ??? 10 bytes/second ???
I don't think that someone has such speed and to load your code
slow-connected person will have to wait more than 5 seconds and even more
longer than to load just blank page with my META :))


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén

Well, there could be a problem with connection due to the ISP.

Maybe this is not relevant with this case, but good to know for future
use.
I.e. if you have a picture on a page which will take more than 5 seconds
to download (maybe due to a problem with connection), meta will
redirect you after 5 seconds even if page is not loaded completely but
the javascript code will wait 'till the page is loaded. Everyone will
see the whole page. And you can allways add an extra link for those who
do not want to wait (or have javascript disabled).


Niklas


-Original Message-
From: Intruder [mailto:[EMAIL PROTECTED]] 
Sent: 17. tammikuuta 2002 16:20
To: Php-General
Subject: RE: [PHP] Display a mesagge and redirect (newbie)


 No good, since meta starts counting when page is first opened, so 
 clients with slow connection might not never see the message. I'd 
 rather use


what do you mean slow connection ??? 10 bytes/second ???
I don't think that someone has such speed and to load your code
slow-connected person will have to wait more than 5 seconds and even
more longer than to load just blank page with my META :))


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread DL Neil

Niklas,

 No good, since meta starts counting when page is first opened, so

Don't think this is applicable - When is the page opened: after the script reaches 
the meta, or after the
script concludes and the web server sends the page to the browser?

If the latter, then the speed of the connection affects the browser wait until the 
page is (temporarily)
displayed, but not the period of display.

Yes if the page being temporarily displayed is bloated, then the redirect-time period 
must be chosen with due
care.

Ultimately it seems way too complicated, but you could use PHP output buffering. By 
then I think the JavaScript
alternative will sound far more attractive...

Regards,
=dn

- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: 17 January 2002 14:05
Subject: RE: [PHP] Display a mesagge and redirect (newbie)


 No good, since meta starts counting when page is first opened, so
 clients with slow connection might not never see the message. I'd rather
 use
 body onLoad=setTimeout(\location.href='http://domain.com/page.html',
 5000\);
 which will execute right after the page is completely loaded and move to
 the next page after 5 seconds.


 Niklas


 -Original Message-
 From: Intruder [mailto:[EMAIL PROTECTED]]
 Sent: 17. tammikuuta 2002 15:52
 To: Php-General
 Subject: RE: [PHP] Display a mesagge and redirect (newbie)


  a) run a mysql query
  b) display a simpe message
  c) delay few seconds
  d)auto redirect to a page


 meta http-equiv=refresh content=5; URL=new_page.php

 body
  some message goes here !!!
 /body


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To
 contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]