Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP FAQs
|
PHP FAQs This moderated forum is where our PHP experts answer some of the questions they see asked most frequently in the other PHP forums. You cannot post other messages here, use the other PHP forums for that.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP FAQs section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 2nd, 2007, 09:29 AM
danu_322
Guest
 
Posts: n/a
Default 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






Similar Threads
Thread Thread Starter Forum Replies Last Post
resize image dhoward VB.NET 2002/2003 Basics 1 June 14th, 2011 04:05 AM
Image Resize Magen Classic ASP Basics 5 January 23rd, 2007 12:17 PM
hyperlink image won't resize chowdn ASP.NET 2.0 Basics 0 October 23rd, 2006 01:19 PM
Image Resize after Upload echovue PHP How-To 2 July 13th, 2006 12:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.