CodeIgniter Forums

Full Version: Conditionally Moving an Uploaded File
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Eric Cope[/eluser]
Hello all,
Maybe it is just late, but does anyone have any ideas on how to conditionally upload a file from a form? I have a form that does not always upload a pdf document. I could compare to the error string, but I was hoping for something more elegant?
Thanks!

El Forum

[eluser]Eric Cope[/eluser]
Reading the Upload library, they check the $_FILE['$field']. If it is set, then they proceed, otherwise throw an error. I guess I could do the same...