Hi, i have created a script that uploads photos and adds them to the database, which are then displayed on a page, however they are coming out too large and taking forever to load, so i am trying to create thumbnails using GD Library.
Now i've already came up with a bulk of code with help from people and tutorials etc.. but i don't know how to add thumb_ onto the start of the file.
I want it to resize image.jpg and then name it thumb_image.jpg
The script is also in a different folder to the images.
I'm not that experienced with PHP, still learning, can anyone point me in the right direction?
Also there are 6 photos being uploaded at a time, so i need it to resize all 6 images, i've pushed all the image into their own variable.
Question
game_over
Hi, i have created a script that uploads photos and adds them to the database, which are then displayed on a page, however they are coming out too large and taking forever to load, so i am trying to create thumbnails using GD Library.
Now i've already came up with a bulk of code with help from people and tutorials etc.. but i don't know how to add thumb_ onto the start of the file.
I want it to resize image.jpg and then name it thumb_image.jpg
The script is also in a different folder to the images.
I'm not that experienced with PHP, still learning, can anyone point me in the right direction?
Also there are 6 photos being uploaded at a time, so i need it to resize all 6 images, i've pushed all the image into their own variable.
$photo1 = $_FILES['picture']['name'][0];
$photo2 = $_FILES['picture']['name'][1];
$photo3 = $_FILES['picture']['name'][2];
$photo4 = $_FILES['picture']['name'][3];
$photo5 = $_FILES['picture']['name'][4];
$photo6 = $_FILES['picture']['name'][5];
Here is the code so far:
Link to comment
Share on other sites
9 answers to this question
Recommended Posts