I do this

Example:
<?
switch($_REQUEST['req'])
{
default:
$click_stamp =date('is');
echo "<form action=? method=post><input type=hidden name=clicks
value=$click_stamp>
<input type=file name=upfile tabindex=1 size=35>
<input type=submit value=upload name=req></form>";
break;

case "upload":

//Upload function here

$dispay_time = date('is') - $_POST['$click_stamp'];
Echo "<CENTER>File took $dispay_time to upload";
//Time stamp it anyway you want EXAMPLE ONLY!!!!!!
break;
}
?>

FOR GODS SAKE DON'T comment on syntax or design. I DO NOT CARE this is a
example ONLY!!!!!!!
OF COURSE I LEFT OUT CODE. OF COURSE THIS IS NOT A COPY PASTE AND IT WILL
RUN!!




-----Original Message-----
From: Jon Westcot [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 4:17 AM
To: PHP General
Subject: [PHP] I need help handling form posting

Hi all:

    In my quest to make things seem easier for the user to understand, I'm
trying to retrieve the time that I start posting a very large file via a
form post.  The form action sends it back to itself, which is fine.  It took
me some time to figure out that NOTHING happens on the client until the form
has been completely transmitted to the server.  In my particular case, this
can be a long time, anywhere from 15 to 30 minutes.  I'd like to be able to
notify the user of when the file upload actually began.

    Is there a way that I can intercept the click of the "Upload" button,
have it update a field (probably a hidden one) with a date/time stamp, and
then have that value included in the $_POSTed values?  I'm thinking
(fearing, rather) that this is probably all off-topic and probably is best
addressed with some type of JavaScript solution, but it's late, I'm not
thinking clearly, and I've been doing data conversions all day, which is a
sure-fire way to get me emulating some Romero zombies.

    Any help you can spare will be greatly appreciated.

        Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to