I need some expert help here.
I'm creating a website that allows images to be uploaded and displayed. However, if a user uploads a huge image, the website will display it big.
I cant figure out how am i suppose to resize the image using the syntax below. Maybe i'm doing it all wrong as i cant think this through.
I cant do this width="'.$width/4.'" as that doesn't work.
<?php
list($width,$height,$type,$attr) = getimagesize("my_image.jpg");
echo "<img src="my_image.jpg" width="'.$width.'" height="'.$height.'">";
?>
Please help