Sinisterly
Image Upload And Display Scripts Needed - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Design (https://sinister.ly/Forum-Design)
+--- Forum: Web Design (https://sinister.ly/Forum-Web-Design)
+--- Thread: Image Upload And Display Scripts Needed (/Thread-Image-Upload-And-Display-Scripts-Needed)



Image Upload And Display Scripts Needed - RaccoonCity_mybb_import13707 - 11-03-2013

Hey guys, I'm currently making a website for a friend, It's going to be a photo website where he'll be able to log in using a Admin CMS. Here he can upload photos, I'm done with the main site with the design and stuff and I'm also done with the Admin panel using a mySQL database.

So, the thing that I need is, some kind of script that makes him able to upload photos to the site and when he has uploaded them they are supposed to be posted on the website. I'm pretty sure you can't use any kind of Variables in HTML.

Help would be appriciated! Thanks.


RE: Image problem? - The Alchemist - 11-03-2013

You'll need a PHP script to upload the image into your server, store the name of the image in your database with some id or name or something to identify who was the user who has uploaded it. And if its just one user whoz allowed to upload(the admin), you need not store so many details. Just the storing image names would be enough.
Here are some image upload scripts: http://www.htmlgoodies.com/beyond/php/article.php/3877766/Web-Developer-How-To-Upload-Images-Using-PHP.htm
http://www.infotuts.com/improved-php-script-to-upload-images/
In these scripts, you need to add the part where you'll have to store the names in the database table.

And to display them, you need another PHP file that will fetch all the stored names from your database table and then display them using the html <img> tags(its a simple mysql/php script).