Regarding the photo information the order of your code is wrong.
Your update code is running before your upload code runs so you will be updating an empty value into the database. If you have a piece of code that refers to a variable in other code, that other code needs to run first otherwise the variable does not have a value.
Also, as you have a redirect in your update behaviour, the upload code will never run because you are telling the page to redirect before it gets to it.
Try correcting that for starters and see how you go from there.
Cheers
Ian