How to connect customers to Database ?

Hey guys , I have products that requires from customer to upload a photo so how can I know which customer place the order ?