Now that I have the attentoin of some who knows something I will try to explain this a little better than before
I am trying to upload images from a <form> and then resize the image 2 different times and creates 2 diffrent image files, and then upload the new image files that I resized into 2 different directories.
I want to do this so I will have a thumbnail and a full sized image of the same photo(for catalog application, click on thumbnail and see full sized image)
***************Curent Proccess*************
Step 1. Get image from user**************************
<form enctype="multipart/form-data" action="$PHP_SELF?>?session_id=<?=$session_id?>&action=<?=$action?>" method="post">
<input type="hidden" name=MAX_FILE_SIZE value=100000000>
<input type="File" name="userfile" size="30" accept="image/jpeg, image/pjpeg">
<input type="hidden" name="newname" size="30" maxlength="255" value="image">
<input type="submit" name="submit"
value="Add Listing">
Step 2.Upload Image to server****************************
//Creates Uniqe name for image
$newname = date("Hisz");
//Uploads Image to directory on server
function do_upload($userfile,$newname)
{
$new_file = "/agents/$newname.jpg";
if (!copy($userfile, $new_file)) echo "failed to copy file $userfile to $new_file\n";
return;
}
*************Target Process(what I need to happen)*********
I want to create 2 images with different sizes and then upload them into 2 different directories
resize 1.*******************************
with=150
height=113
directory=/thumnails/$newname.jpg
resize 2. *******************************
width=300
height=225
directory=/agents/$newname.jpg
***************Ideal Process******************************
Step 1/Get Image from User
Step 2/resize image into thumnail(with=150 height=113) and upload to /thumbnails/$newname.jpg
Step 3/resize image into standard larger size(with=300 height=225) and upload to /agents/$newname.jpg
**********Other Comments*****************
I have been messing around with imagecopyresized() and have no Idea what I am doing I do have GD 2.0 installed , I would appreciate some help wit this I am loosing lots of time trying to figure this out and have no expert help available to me
Thanks For Your Help
*********Specs***********
RedHat inux 6.1
PHP 4.0.6
Apache
GD 2.0