Pure PHP Upload 3 Support Product Page

Solved

Uploading File Name to database problem

Reported 24 Aug 2013 11:55:04
1
has this problem
24 Aug 2013 11:55:04 Keith Mears posted:
I am trying to upload the File Name into a database but have tried to link to the Upload from the Upload 3 field, it does not work; Tried it with a form hidden field linked to the upload record but neither works, the upload function is working fine. I have tried it from the width that does send a '0' value but not the width value as set in the PHP Upload 3 setting.
Any help would be appreciated.

Replies

Replied 26 Aug 2013 08:08:54
26 Aug 2013 08:08:54 Teodor Kuduschiev replied:
Hello,

Please check the following part of the manual, it describes how to do this:
www.dmxzone.com/go/21577/pure-php-upload-3-manual/advanced_using_pure_php.htm
Replied 27 Aug 2013 06:04:43
27 Aug 2013 06:04:43 Keith Mears replied:
Hi - Yes, I have followed the manual but it does not pick up the file name when I add the file to be uploaded.

I have also tried to bind a hidden field and do it that way but that does not work either.

Thanks
Keith
Replied 27 Aug 2013 09:08:59
27 Aug 2013 09:08:59 Teodor Kuduschiev replied:
Hello Keith,

Please send me your php page to
Replied 28 Aug 2013 09:22:08
28 Aug 2013 09:22:08 Teodor Kuduschiev replied:
Please use the following binding in the insert record:

Replied 29 Aug 2013 06:33:51
29 Aug 2013 06:33:51 Keith Mears replied:
Hi Teodor - Yes, I have done this before by adding a "Hidden Fleld" and binding via the "bind a Dymamic Source, but that does not work.

Have sent the following file where this has been done. Not sure if it makes any difference but I am using Dream Weaver on a Apple Mac. This set up gives a "null" return to the database!, all a little frustrating because the file upload does work fine and all other fields in the table do upload OK.

Have sent another email with with binding in place for you to look at.

Thanks for your continued support with this.

Keith
Replied 30 Aug 2013 11:39:28
30 Aug 2013 11:39:28 Keith Mears replied:
Hi Teodor - Thanks for your continued support, unfortunately the frustration continues! Inserting your changes to the code I am still not able to upload the fileName, it will upload the "path" though! Interesting when loading the Full Path it does not include the "File Name".

I have now set up a blank page and started from scratch with just a form on the page but I am left with the same result and the fileName is not being transferred across with the binding for some reason. As before the "File Path" is uploaded but only to folder level and file name is not included.

Hope this all make sense.

Keith
Replied 30 Aug 2013 11:46:28
30 Aug 2013 11:46:28 Teodor Kuduschiev replied:
Hello,

I forgot to change the FileName binding in the code to the actual file field name, please do this and check if it is ll okay.
Replied 30 Aug 2013 14:29:12
30 Aug 2013 14:29:12 Keith Mears replied:
Hi - Not sure I understand, the code in your file looks OK, please see below:

<input name="Upload" type="file" id="Upload" onchange="<?php echo $ppu->getValidateCode() ?>;return document.MM_returnValue" />
<input name="FileName" type="hidden" id="FileName" value="<?php echo $ppu->files("Upload"->fileName ?>" />

Have I missed the point of this function, I thought it would take the file name of the file being selected by the user, is this not correct.

Thanks again

Keith
Replied 30 Aug 2013 14:44:16
30 Aug 2013 14:44:16 Teodor Kuduschiev replied:
What i mean is - Your upload file field has a name/id of "Upload"
Please use "Upload" in the insert record code, for the image name in the DB.
Replied 30 Aug 2013 15:36:01
30 Aug 2013 15:36:01 Keith Mears replied:
Hi Teodor - boy you have some patience and I thank you for that and your perseverance with me. You will be pleased to hear I have it working and it is so obvious now that I could scream, 'not as load as me' I can hear your saying!

Thanks again.

Keith

Reply to this topic