Posts

Showing posts from May 8, 2010

Tracking file upload progress in php

Tracking file upload progress To receive a file, we must first set up a form which will receive the file. Conveniently, HTML comes with a standard field type for files. Like all HTML form fields, it is named logically, as type file  It comes with a handy  Browse  button that appears to the right of the block by default. HTML form for upload.php <?php $id = $_GET['id']; ?> <form enctype="multipart/form-data" id="upload_form" action="target.php" method="POST"> <input type="hidden" name="APC_UPLOAD_PROGRESS" id="progress_key" value="<?php echo $id?>"/> <input type="file" id="test_file" name="test_file"/><br/> <input onclick="window.parent.startProgress(); return true;" type="submit" value="Upload!"/> </form> We need to make a PHP page for this form because we need a unique k