Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP FAQs
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:54 AM.


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