473,749 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

need advise....re: an uploading message

6 New Member
hello :)

i have managed to get my php to work as in, an uploader user page

1) upload.php ||| amount of files to be uploaded

[php]
<html>
<head>
<title>Upload_A mount</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="upload_ get.php">
<p>Enter the amount of boxes you will need below. Max = 9.</p>
<p>
<input name="uploadNee d" type="text" id="uploadNeed " maxlength="1">
</p>
<p>
<input type="submit" name="Submit" value="Next">
</p>
</form>
</body>
</html>
[/php]

2) upload_get.php ||| browse and upload files

[php]
<html>
<head>
<title>Upload_B rowse</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<form name="form1" enctype="multip art/form-data" method="post" action="process .php">
<p>
<?
$uploadNeed = $_POST['uploadNeed'];
for($x=0;$x<$up loadNeed;$x++){
?>
<input name="uploadFil e<? echo $x;?>" type="file" id="uploadFile< ? echo $x;?>">
</p>
<?
}
?>
<p><input name="uploadNee d" type="hidden" value="<? echo $uploadNeed;?>" >
<input type="submit" name="Submit" value="Upload">
</p>
</form>
</body>
</html>
[/php]

3) process.php ||| the uploader

[php]
<?
$uploadNeed = $_POST['uploadNeed'];
for($x=0;$x<$up loadNeed;$x++){
$file_name = $_FILES['uploadFile'. $x]['name'];
$file_name = stripslashes($f ile_name);
$file_name = str_replace("'" ,"",$file_name) ;
$path = 'uploads/';
$copy = copy($_FILES['uploadFile'. $x]['tmp_name'],$path.$file_na me);

if($copy){
echo"<font color=#009999 face=verdana size=10>$file_n ame | uploaded sucessfully!<br >";
}else{
echo "$file_name | could not be uploaded!<br></font>";
}
}
?>
[/php]

i don't know how to implement a process indicator though :(

i have found a few sites that output the file upload process
but they either use flash or javascript...

http://pdoru.from.ro/

http://swfupload.mammon.se/


i only want a simple message to display after the "upload" input button is clicked

i had been studying the php code and the "action" command
on the input line directs the subsequent action (lol) of the
button as in....

[php]
<form name="form1" method="post" action="upload_ get.php">
[/php]

this opens the page "uplaod_get.php "

[php]
<form name="form1" enctype="multip art/form-data" method="post" action="process .php">
[/php]

this then runs the process.php data

i would like an intermittent page/code in between the upload_get.php and the process.php to display "uploading in process, please wait....." and also be able to read/process the process.php data


this may be simple, may be hard but i can't do it :(


any help with this?


thanks


sophia
Sep 20 '07 #1
1 1427
code green
1,726 Recognized Expert Top Contributor
i would like an intermittent page/code in between the upload_get.php and the process.php to display "uploading in process, please wait....." and also be able to read/process the process.php data
This one often crops up because lack of knowledge about the client - server process.
PHP does not work like Windows programs because it runs on the server.
And only when all the scripts have finished executing is the output returned to the client, so everything arrives at once.
It is possible to simulate this idea using javascript because javascript runs on the client.
Sep 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
7837
by: Kevin Ollivier | last post by:
Hi all, I've come across a problem that has me stumped, and I thought I'd send a message to the gurus to see if this makes sense to anyone else. =) Basically, I'm trying to upload a series of files via FTP. I'm using ftplib to do it, and for each file I'm using transfercmd("STOR " + myfile) to get the socket, then uploading 4096 bytes at a time and providing status updates via a GUI interface. Finally, I close the socket, set it to...
3
1870
by: Mike | last post by:
Hi i have a problem in asp.ne i am uploading file to the server using htmlinput controls and every thing is o but i try to upload larger file to the server like more than 4 mb and about 10mb i got server connection lost and time out some no responce is there any solution to that problem using asp.net and c thank
1
2206
by: Jonathan | last post by:
Hi everyone, I have a problem with the file uploading in Asp.Net and I have read a lot on forums on this but never found an answer. Here is the problem: I know Asp.Net maximum Length for uploading a file to the server is 4Mo but I changed that maximum to about 10Mo in my web.config file : <httpRuntime executionTimeout="45" maxRequestLength="10000" useFullyQualifiedRedirectUrl="true" />
13
4319
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I cleanup files that were uploaded -- but obviously left stranded when the users aborted/gave up writting...
3
2365
by: Carlos | last post by:
Hello Forum, I would appreciate it if you could recommend settings to use auto-vacuum in my version 7.4 database. I am uploading several thousands records in the database at a rate of ~1 second per record (the data is uploading from a different server). I have noticed that the performance of the uploading is improved if I vacuum the database every so often so I decided to take advantage of auto-vacuuming to maintain the best...
5
2053
by: Jared | last post by:
I'd like to display a "please wait while your file is uploading" page immediately after someone uploads a large-ish file. I know I could make something really slick with DHTML, or even something semi-slick using a hidden frame to post the form to. However, both of these approaches carry browser-compatibility risks. It's my understanding that my server-side code doesn't execute until the file is completely received by IIS, so I can't...
5
2727
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or more documents to share/use during a meeting presentation. What would be the most efficient way to approach this? This is the logic I'm currently considering: Page 1: Meeting Information input with link to a document upload page (this page...
2
1376
by: Erwin Moller | last post by:
Hi group, I am looking for a Wiki powered by PHP. I found many here: www.c2.com/cgi/wiki?WikiEngines And a nice top10 list here: www.c2.com/cgi/wiki?TopTenWikiEngines Does anybody in here have some firsthand experience with some of them?
2
1550
by: Velhari | last post by:
Hi all, I developed the following codes to implement the concept of Multiple file Uploading Process. Actually my goal in this implementation is to uploads the files onto the server and i have to show the status of each and every file to the end user while uploading. In other words, when the first file is start for uploading, means to show the status as "Processing..." After the first file is uploaded onto the server means to show...
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
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,...
0
9562
Oralloy
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...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
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...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.