hi guys,
I am totally new to coding so please bare with me.
I have a file upload field in a form on a PHP page for users to upload pictures, i also have the following fields in my MySQL database
"image_fold er" - this contains a default value of the image folder in my root folder
"image_path " - this automatically combines the image_ folder with the image_name to generate the path to the users image
"image_name " - i want this field to contain the name of the users image
Does anyone know how i would be able to "grab" the file name and automatically inserts it in the image _name field when the file is uploaded.
Cheers for any advice
I am totally new to coding so please bare with me.
I have a file upload field in a form on a PHP page for users to upload pictures, i also have the following fields in my MySQL database
"image_fold er" - this contains a default value of the image folder in my root folder
"image_path " - this automatically combines the image_ folder with the image_name to generate the path to the users image
"image_name " - i want this field to contain the name of the users image
Does anyone know how i would be able to "grab" the file name and automatically inserts it in the image _name field when the file is uploaded.
Cheers for any advice
Comment