Am trying to work out how to update my database for the image name I have selected with out the need of pressing any buttons just the image it self.

there would select the image and it would show a preview and auto update the selected image src address to the database.

can anyone help?

Thanks

If you want quick, seamless approach that the user is completely unaware of, use jQuery and put a onclick on the image. When it is clicked make an AJAX call to a php script, passing the name of the image, and let the script do the database bit.
When it completes and returns success or failure you can inform the user on the page or not, whatever works with how you want the process to work.

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.