Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to display text but script blocks

Status
Not open for further replies.

excession

Programmer
Sep 22, 2004
111
GB
I have a script which uploads files to a server. I want to be able to display a 'please wait' type message while the script is running.

I have tried using the ftp_nb_put but it didn't work, maybe it was somthing I did wrong.

Next i tried displaying an intermediate page first and using a meta refresh tag to call the upload script after a second, but that just seem to continually refresh.

Any idea how to get round these problems?

Thanks in advance

 
On the same page run the script and print "please be patient" or whatever and at the end of the page insert:
Code:
location(thankyou.php);

What this does is while the code is running a message will be printed. After the code is completed it will run into the location instruction and will relocate to a different page i.e. Thank-you page

Reality is built on a foundation of dreams.
 
Thats is what I'm trying to do but the text only displays when the scrips has finished execution...

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, [URL unfurl="true"]www.pspad.com">[/URL]
  <title>Uploading ...</title>
  </head>
  <body>
  <h1>Please wait...</h1>
  <h4>Uploading flatfile and images now...</h4>
  <?php include('doftp.php'); ?>
  </body>
</html>

However the 'please wait message only appears after the doftp.php script returns.

I need the 'please wait message to display while the doftp.php script executes

Any ideas?
 
I have no idea lol,

How would I tell, turn it on/off and what should it be set too?
 
I believe most pages that display that type of message use Javascript. When you use PHP to upload a file, you script doesn't start until the file is uploaded.

Ken
 
I don't mind using an intermediate page, but need to find some way of calling the script from within it after the message has been displayed

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top