How to store and view x-ray images through php code

I am dealing with hospital management system and now I want to store x-ray images on my server and display it to required person on demand, but I don't have any idea how to do it. Can anybody help me out? I am using core php for this system.