forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: aszasz on January 25, 2005, 09:00:45 pm

Title: How to require custom fields
Post by: aszasz on January 25, 2005, 09:00:45 pm
I would like to require users who upload photos to complete the first of the four custom fields ('user1' in database, '$user_field1_name' in code).  If they do not complete custom field 1 when they upload a photo, they will see an error message and will not be allowed to upload that file (however, they can return to the upload page and try again).

I am deep into the code of the file: upload.php (beautifully written and commented code, by the way - a pleasure to work with).  I have located the error-checking section of the code (starting around line 1140).  My question is, at this point in the code, where are the custom field values kept?  They are not in the file_upload_array, nor are they, obviously, in the escrow_array yet, nor are they in the database (duh).  Can I get them from $_POST or $_GET?  

Where can I find the value of $user_field1_name at this point in the code so that I can check to make sure it's not empty?

Thanks in advance for any help.