Page 1 of 1
How to upload multiple files using PHP
Posted: Tue Jun 26, 2007 2:33 am
by dream2rule
Hello All,
I would like to know how do i upload multiple files in a form. In the form, there are around 10-12 fields to browse files and when i click on the submit button i want to store all the uploaded files into the database and also i want to retrieve them.
Can anyone help me with the code?
Thanks and Regards,
Dream2rule
(a NOOB)
Posted: Tue Jun 26, 2007 2:47 am
by Oren
Just as you would upload a single file
P.S Don't store files in the database. Instead, store in the database the file's path.
Posted: Tue Jun 26, 2007 3:14 am
by dream2rule
thanks oren for your reply...
Yea i meant that i would store the file path in the database.
Can you give me an example to retrieve multiple files that have been uploaded.
Thanks and Regards
Posted: Tue Jun 26, 2007 3:31 am
by volka
There's an example in the manual
Posted: Tue Jun 26, 2007 3:48 am
by dream2rule
hie volka.. that script isn't working
any other means?
Posted: Tue Jun 26, 2007 4:11 am
by volka
It's working fine for me.
What error message do you get? If you don't get an error message please
change the settings of error_reporting and display_errors to
Code: Select all
error_reporting=E_ALL
display_errors=On
in the php.ini of your test/development server.
Code: Select all
<?php echo 'ini: ', get_cfg_var('cfg_file_path'); ?>
tells you which file you have to change.
You might have to restart the webserver.
Posted: Tue Jun 26, 2007 5:37 am
by dream2rule
thanks volka.. i hope this works..!
Posted: Tue Jun 26, 2007 6:01 am
by volka
It will not "fix" the script. But errors and warning messages should be display in the browser then.