I would like to know how I can automatically call other scripts if I
have to first display a message. The reason is I would like to
display a message for about 30 seconds then automatically call another
script but if I do this with header() I get an error.
Another question I have is, Is there a PHP method equivalent to
setInterval() in JavaScript?
Thank you
John 3 1984
*** John wrote/escribió (23 Mar 2004 08:42:30 -0800): Another question I have is, Is there a PHP method equivalent to setInterval() in JavaScript?
Hmmm... sleep() maybe?
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
On Tue, 23 Mar 2004 08:42:30 -0800, John wrote: I would like to know how I can automatically call other scripts if I have to first display a message. The reason is I would like to display a message for about 30 seconds then automatically call another script but if I do this with header() I get an error.
You could use this to display a message and redirect after 30 seconds:
<html>
<head>
<META HTTP-EQUIV="REFRESH" CONTENT="30;URL =http://your.redirect.u rl">
</head>
<body>
Your message here
</body>
</html>
Regards,
Henk Burgstra
> The HTTP-EQUIV means you're trying to fake an HTTP header. PHP gives you the advantage of issuing a proper HTTP refresh header. I've never done it, but this may work:
header("Refresh : 30; URL=http://example.com/");
From the quick bit of Googling I've done, I read that some browsers may not support this header, but it is still more reliable than a META refresh. Also, the redirect address should be included as part of your message.
Sure, but the op asked for a solution *without* using the header method
because that caused an error.
Regards,
Henk Burgstra This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Charles Soto |
last post by:
I've got a main loop script that calls two other scripts that do no
user interaction. All they do is send a couple of mysql update
statements. Then they use header() to call the main loop again. This
works fine, EXCEPT the mysql statement isn't finished by the time the
main loop is called. This is a problem because the main loop actually
queries that same table to show the value of the rows you just
changed. If I refresh the page...
|
by: annie |
last post by:
Can anyone point me in the right direction here?
I've got this little image script
<?php
$im = ImageCreate(200,200);
$white = ImageColorAllocate($im,oxFF,oxFF,oxFF);
$black = ImageColorAllocate($im,ox00,ox00,ox00);
ImageFilledRectangle($im,50,50,150,150,$black);
header("content-type: image/png");
|
by: Carramba |
last post by:
hi!
I don't have eny code to chare, this is just teoretical question.
usualy you have for looks like
<form method="POST" action="some_php_script.php">
namn: <input type="text" name="name" size="20">
<br>
city <input type="text" name="city" size="20">
<input type="submit" value="Submit"><input type="reset">
</form>
|
by: Bern McCarty |
last post by:
I have run an experiment to try to learn some things about floating point
performance in managed C++. I am using Visual Studio
2003. I was hoping to get a feel for whether or not it would make sense to
punch out from managed code to native code (I was using
IJW) in order to do some amount of floating point work and, if so, what that
certain amount of floating point work was
approximately.
To attempt to do this I made a program that...
|
by: Duff B |
last post by:
Hi,
this code perfectly works when I try to force the download of a file,
by calling it directly.
<?php
$file = "onefilename.txt";
if (!is_file($file)) { die("<b>404 File not found!</b>"); }
| |
by: paolo.dx |
last post by:
Hello, I have to call a member funtion "myclass.myfunc()" from another
function "void method();" but I don't know the name of "myclass" and
"myfunc()" because I'm writing a library.h that has to be put in the
header of a given file.
this is an example of the given file, obviously I can't modify this
file, but I know that the funcitions are always without arguments and
void type.
CLASS(myclass){
|
by: Eric |
last post by:
I am writing a program with several header files. I would like for some
of them to be aware of others. Here is a small example of my problem in
three different files:
//// main.c++
#include "A.h"
#include "B.h"
int main () {
using namespace std;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |