How do i store images on a mysql server and preview on a webpage using PHP. or
how do i preview images using PHP on webpages.

The idea is to store the images in a folder on the server and to store the image path in MySQL. MySQL was not designed for images, only raw data. However it can be done. Here's a link to a tutorial on storing directly to the db and here's one for storing on the server.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.