I have form with upload file.
Everything goes smoothly.
but i dont have data input (file name on data table), so i know which file belongs to
for example:
- i upload file call picture1.jpg
- on upload directory the file exist
- but on my data table it's empty (null)
how to put the file name int the data table?
thanks.
Hi,
Lets try those steps:[list]
I will assume your upload field is called "fileup"at the table creation screen, choose it very normally like any other fieldAfter table creation, open your form in the backend for editing, go to the "auto generated" tab, Look for $_POST['fileup']
replace it with : $_FILES['fileup']['name']
[/list]please let us know the results!!
🙂Cheers
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
still the same.
1. the pic successfully upload to the upload directory.
2. no data (filename) on the sql.
i attached the form code and also the autogenerated code for your reviews..
sorry, coz i dont have knowledge in php [file name=form_uploadfile.zip size=2131]http://www.chronoengine.com/components/com_fireboard/uploaded/files/form_uploadfile.zip[/file]
I just wanted to mention that I tried this fix and it worked perfectly.
-suckerhead; I glanced at your generated code and it appears correct with one minor issue.
$_FILE['photo']['name']
should actually be
$_FILES['photo']['name'] –notice the S in FILES
I believe that would resolve your issue. My apologies if I am incorrect.
Thanks, this is an excellent component!
Daniel
gooosshhh....
sorry... i missed the 'S'
all worked great...
thanks a lot guys...
Thanks Daniel, Thanks Suckerhead🙂
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi orob,
I assume you are using Joomla 1.5.x - the Autogenerated code is different for that which is why you can't find the $_POST variables. This is an old thread, if you search the forums for FILES I'm fairly certain that you'll find newer posts with the information you need. Please post again if you don't.
Bob
hello,
thanks .
i tried that, but no luck,
seems like it doesn;t work at all, even when I use only the code that you suggested for one uploaded file. (i'm using joomla 1.5.3)
so what i want to achive is :
1. upload 2 files and see them in backend (now I have only one)
2. links in backend to specified files
3. the whole name of the file in backend (with autogenerated date - now I have filename, without the date as prefix)
i would appriciate if you could help me solve this problems.
Maybe anyone has a solution for that.
thanks
Hi Orob,
Lets do it step by step, for the first file, add this code : $attachments[0], for the second, $attachments[1]
tell me what can you see at the data view page by now!
Cheers
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi orob,
The variable name 'Zdjęcie' may be causing you problems - you see it shows up with the html entity in the code you posted. Please try a version without special characters like 'zdjecie'
Bob