Now I have an insert form just like that:
$sql="INSERT INTO products (pname, pcat, pimg1, pimg2, pimg3, pnotes, pclient, pclientaddress, pclientphone)
VALUES
('$_POST[pname]','$_POST[pcat]','$_POST[pimg1]','$_POST[pimg2]','$_POST[pimg3]','$_POST[pnotes]','$_POST[pclient]','$_POST[pclientaddress]','$_POST[pclientphone]')";
Instead of entering the URL value of three different images, is there a way I can upload one image and have there different sizes of it, the original one to be named 1001a and two other 1001 and 1001b?
Find below php code to upload and crop image using GD library. You can save only one image name in database and other croped images will be access using the same name, but it should be stored in different-different directory as below:
You need to store $imgNormal value in database only.
for more reference click on below link:
http://pastebin.com/Ed2YHV6w