hacksurfin79 Posted June 22, 2009 Share Posted June 22, 2009 I recently switched hosting companies and now I have problems with a form that work perfect before. I am sure it is an easy fix but cannot figure it out. If filling out the form I don't attach anything I get this message. But if I attach a file it works fine. Warning: file() [function.file]: Filename cannot be empty in /home/patchss/public_html/free_quote.php on line 26 Warning: file() [function.file]: Filename cannot be empty in /home/patchss/public_html/free_quote.php on line 106 Warning: Cannot modify header information - headers already sent by (output started at /home/patchss/public_html/free_quote.php:26) in /home/patchss/public_html/free_quote.php on line 165 Link to comment https://forums.phpfreaks.com/topic/163249-need-help-with-form-warning-file-functionfile-filename-cannot-be-empty-in/ Share on other sites More sharing options...
gevans Posted June 22, 2009 Share Posted June 22, 2009 You probably have error display turned on on the new host, where you didn't before. If you can show the script around the attempted file uploads it's a simple fix. You need to see if the user has attempted to attach the file. If not, dont try and upload one. Link to comment https://forums.phpfreaks.com/topic/163249-need-help-with-form-warning-file-functionfile-filename-cannot-be-empty-in/#findComment-861301 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.