Forums

PHP

This topic is locked

PHP Upload sends with require upload unchecked

Posted 29 Sep 2003 09:57:26
1
has voted
29 Sep 2003 09:57:26 Ken Zill posted:
I'm using Pure PHP Upload with MySQL. I have a new page and an edit page. They both have upload fields. The edit page shows the name of the uploaded files. However, if I don't upload any new files on the edit page, but I update the form, it sends null values to the database for the upload fields. I have "Require Upload" unchecked. I would like it to not send null values to the database for the upload fields, but only send if there is a file name in the upload field. Can it check to see if the field is empty and not send if it's empty?

Replies

Replied 03 Oct 2003 10:00:39
03 Oct 2003 10:00:39 Rick Heidrick replied:
Same problem here. My work-around was to add a link that popped-up a small window with just the Upload field and the upload/update code. Once they had completed the upload, the user can close the window and finish editing/updating the rest of the form without losing the file name.

Not the best solution, but the client was just as happy.
Replied 07 Oct 2003 04:23:17
07 Oct 2003 04:23:17 Tim Thorburn replied:
How were you guys able to get Pure PHP Upload to insert the filename initially into your database??

I've been trying since yesterday afternoon and am about ready to throw this extension away and ask for a refund as its not doing anything that I need it to.

Yes it does upload a file to my server, but it only passes a NULL value to my database which makes the entire extesion fairly useless. I've sent emails to several people at dmxzone today with no reponses at all.

I did as the tutorial suggests - make my form, add an Insert behavior with a redirect URL at the end. Then I add a Pure PHP behavior without a redirect URL - all other fields are placed into the database properly except for the path and filename (I've tried storing both just the filename and the path and filename with equally unsuccessful results).

After reading various postings on this site and doing a search on Google for Pure PHP Upload - is the lack of communication the level of support I can expect after purchasing this extension for $120Cdn!!?!??!

Some people can get parts to work - others can get nothing to work ... yes there would be varying server configurations however I've tried this upload script on my local testing machine as well as two other hosting servers - all with the same extremely disappointing results.
Replied 14 Oct 2003 15:46:17
14 Oct 2003 15:46:17 Patrick Woldberg replied:
There is an support forum dedicated to Pure PHP Upload at www.dmxzone.com/forum/default.asp?NewsId=4509

The latest version of Dreamweaver uses $_POST instead of $HTTP_POST_VARS that the previous versions use. Pure PHP Upload is still based on the $HTTP_POST_VARS, if your version uses the $_POST you should change them all to $HTTP_POST_VARS else the filename is not stored into the database.

The Update Record Behavior is edited by Pure PHP Upload, it adds the function IFNULL to the query. The Update Record Behavior is edited when you save the document, however in some cases it seems not to do this correctly. Look if the IFFNULL function is added to the Update Record Behavior

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 28 Nov 2006 21:26:45
28 Nov 2006 21:26:45 chris Rees replied:
Patrick,

Can you elaborate on the ifnull issue? Can you post sample code showing where that should be included? I'm having the same issue... Editing a form with an existing file uploaded (i.e. picture) and then updating sends a null field to the MySQL and erases the picture...

Any help would be appreciated, thanks!



<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
There is an support forum dedicated to Pure PHP Upload at www.dmxzone.com/forum/default.asp?NewsId=4509

The latest version of Dreamweaver uses $_POST instead of $HTTP_POST_VARS that the previous versions use. Pure PHP Upload is still based on the $HTTP_POST_VARS, if your version uses the $_POST you should change them all to $HTTP_POST_VARS else the filename is not stored into the database.

The Update Record Behavior is edited by Pure PHP Upload, it adds the function IFNULL to the query. The Update Record Behavior is edited when you save the document, however in some cases it seems not to do this correctly. Look if the IFFNULL function is added to the Update Record Behavior

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Reply to this topic