PHP Script for Uploading

jlcpcnc

Baseband Member
Messages
28
Location
United States
So the script works but not perfectly like i want it,

I want a user to click "upload" select multiple files and then upload them to my server.....

Currently i am only seeing the very last file that is selected and so it seems even though the script shows the number of files select it does not upload all the files.

Here is my code

PHP:
<!--Capture and submit forum-->
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<input type="file" value="" name="upload[]" multiple>
<form method="post" action="verify.php">
        <?php
          require_once('recaptchalib.php');
          $publickey = "KEY GOES HERE REMOVED BY USER";
          echo recaptcha_get_html($publickey);
        ?>
        <input type="submit" />
      </form>
<!--Capture and submit forum-->
 
Check out: How To Automatically Scan Uploaded Files For Viruses With php-clamavlib | HowtoForge - Linux Howtos and Tutorials

There is a PHP Library that allows you to scan uploaded files with ClamAV.

You could also limit the types of files that your users can upload. For instance, if you only want people to be able to share images, then there is no point in allowing exe's to be uploaded. You could go for a whitelist (only allow certain types of files), or a blacklist (dis-allow specific file types)...
 
I am afraid to pass along the website as I do not want to get flagged for advertising.

But even when I set the multiple tag option i can select multiple files but it only uploads the last file selected.

Also my captcha works perfectly.

BTW, I am running windows and wamp

What I would like is for antivirus to scan the file when the submit button is pressed so that before the file ever hits the server it is scanned.
 
You can post your website, I don't think that you will be flagged for advertising, and if you do I can talk to one of the admins for you. Most of the time if they see it is needed for a thread then they will leave it alone.
 
Dear you need to studu HTML and PHP forms and then read about Saving your data into MySQL. Do have a look at the Copy() function in PHP and know how to save your files.
 
hi, had a break in my home the other week. took all my nice bits i pad i pods mp4 player etc but my sony vaio tz was taken. getting old now but was great for what i used it for! what do i get to replace it these days?
many thanks in advace to any help i get!
 
Last edited:
Back
Top Bottom