class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Strictly speaking, you would need to call process() twice to store the image on file and in the database.
But in fact, you can simply retrieve the image content as in my code example, calling process() without an argument, and then you can save the return value to the database, and dump it to the disk too, using for instance imagepng() or any other PHP image functions.
Sa you can call process() once, and save the image content several times if you wish.Reply
But in fact, you can simply retrieve the image content as in my code example, calling process() without an argument, and then you can save the return value to the database, and dump it to the disk too, using for instance imagepng() or any other PHP image functions.
Sa you can call process() once, and save the image content several times if you wish.