473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

need advise....re: an uploading message

6
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_Amount</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="uploadNeed" 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_Browse</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<form name="form1" enctype="multipart/form-data" method="post" action="process.php">
<p>
<?
$uploadNeed = $_POST['uploadNeed'];
for($x=0;$x<$uploadNeed;$x++){
?>
<input name="uploadFile<? echo $x;?>" type="file" id="uploadFile<? echo $x;?>">
</p>
<?
}
?>
<p><input name="uploadNeed" 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<$uploadNeed;$x++){
$file_name = $_FILES['uploadFile'. $x]['name'];
$file_name = stripslashes($file_name);
$file_name = str_replace("'","",$file_name);
$path = 'uploads/';
$copy = copy($_FILES['uploadFile'. $x]['tmp_name'],$path.$file_name);

if($copy){
echo"<font color=#009999 face=verdana size=10>$file_name | 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="multipart/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 1400
code green
1,726 Expert 1GB
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
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...
3
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...
1
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...
13
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...
3
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...
5
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...
5
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...
2
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...
2
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.