Uploading photos using php & mysql

Hey guys,

I am trying to make a CMS where the user can edit or make new pages and can change text and photos.

I have the text part down, but does anyone know of any good websites or just knows how to upload photos using PHP and making them go into a MySQL table just for that page and making them show up on the website? Also how to delete them?