php image resize
Hi guys,
I have a problem resizing(creating thumbnails) to the images uploaded.
Can any one of you please help me. I have the upload script and it looks like below....
<?php
$n=$_FILES['user_file']['name'];
$type=$_FILES['user_file']['type'];
$size=$_FILES['user_file']['size'];
$time=time();
$n=$time;
$path="uploads/$n";
if($n=='')
{
$pic_flag="y";
}
else
{
$pic_flag="N";
}
if ($size<5000000 && ereg("image", $type))
{
move_uploaded_file($_FILES['user_file']['tmp_name'],$path);
$root="http://www.webusers.com/uploads/";
$path2=$root . $n;
echo "<center>";
echo "<h3>Your Image Link Is:</h3><a href=$path2>$path2</a><br><br>";
echo "<br>";
echo "<img src=$path2 border='5'></img>";
echo "</center>";
}
?>
Thanks in advance,
karthik
|