Jump to content

Recommended Posts

I would tend to use Flash for this, as it is a nice way to go.

 

If you would like to not use flash, AJAX would be another alternative.

 

Ajax Upload with Progress Bar

 

As far as anything being simple, there will not be. You will have to implement etc and it will require some modifications/work.

<?php 
// Where the file is going to be placed 
$target_path = "/URLfor-the-file-to-be-uploaded-to";

/* Add the original filename to our target path.  
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); ?>

<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']?>" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>

 

This is a simple upload form, I'm not sure if it works, I aint tested it, but it looks promising. To create a progress bar, it could be done with Flash as stated in previous replies, alternatively, you would use PHP and AJAX. Check the links given for the progress bars.

Its the progress bar bit i cant do

Unfortunatly you will probably have to scrap what you have done already and download a complete uploader script. Adding a progress bar isn't straigt-forward. You will see the complexity after downloading one.

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.