I have a form that appears in a popup when the user presses Upload. It uses the upload.php file.
The form contains title, a photo file input, a description and a category. The form also uploads the submitter's id to my db.
I want the same form to popup when the user presses Edit in one of his own uploaded photos, but with the fields populated with data from the relevant row, probably using a lookup.php file.
I looked up how to do it, but results assume the form does not perform any other function other than being populated with existing data. Any ideas how I can perform what I want?
I do have the code, but first I'd like to understand the concept.