php - Storing image URL's in database and retrieval process -
i new php/mysql. trying store image in database via url(image location) @ moment php code storing image in folder in directory called upload. insecure want put url in database. code based of imageupload-website here url example generated code:
http://www.example.com/imageupload/uploads/medium/uniqueimagename.jpg
- how construct valid table store url's? should varchar?
- how can retrieve url database , display image? php query of filename in database or original url?
1. how construct valid table store url's? should varchar?
i wouldn't store complete path of url database. so, if have:
http://www.example.com/imageupload/uploads/medium/uniqueimagename.jpg
i store:
size: 2 (medium) name: uniqueimagename ext: jpg
2. how can retrieve url database , display image? php query of filename in database or original url?
just fetch data database , put raw data in html
Comments
Post a Comment