Hey there.
I have a website that works like the following:
A Javascript / PHP photo gallery is displayed on the page, cycling through 3 images that are uploaded. These images are coded into a javascript file / php file.
Everytime I want to add a picture, I'll have to ftp the image to the directory and edit the code to add a new picture.
What I want to do is this:
Have an upload field where I can select an image to upload. When I click submit, the following have to take place:
The image needs to be resized to certain dimensions.
It needs to be uploaded to the proper directory.
The code needs to edit itself.
What I was thinking was having a txt document store all the url info for the script. When the uploaded image is uploaded, php will open the text document and add the correct string based on the image name (example: photo2.jpg).
Then, when the page is viewed, the php script does an include of the text document, and voila. It's displayed.
Is this possible to do?
I have a website that works like the following:
A Javascript / PHP photo gallery is displayed on the page, cycling through 3 images that are uploaded. These images are coded into a javascript file / php file.
Everytime I want to add a picture, I'll have to ftp the image to the directory and edit the code to add a new picture.
What I want to do is this:
Have an upload field where I can select an image to upload. When I click submit, the following have to take place:
The image needs to be resized to certain dimensions.
It needs to be uploaded to the proper directory.
The code needs to edit itself.
What I was thinking was having a txt document store all the url info for the script. When the uploaded image is uploaded, php will open the text document and add the correct string based on the image name (example: photo2.jpg).
Then, when the page is viewed, the php script does an include of the text document, and voila. It's displayed.
Is this possible to do?
Comment