I have spent days looking for a php script that will re size a image to 100 width whilst keeping the original aspect ratio but cant find anything I am capable of implementing.
Please could someone help?
I have the code below working on my site and am able to upload and view specific profile pictures images for the user logged on.
Below is the code I am using. I worked through this from three phpacademy tutorials, http://www.youtube.com/watch?v=0_bxXgoUJjs.
$username = $_SESSION[‘id’];
$name = $_FILES[‘myfile’][‘name’];
$tmp_name = $_FILES[‘myfile’][‘tmp_name’];
$location = “avartars/$name”;
$query = mysql_query(“UPDATE labourexpress_registration SET imagelocation=’$location’ WHERE reg_id=’$username’”);
echo(“your avatar has been uploaded”);
//check file type check
echo (“Please select a file”);
Any assistance would be appreciated.