Open Source Development Tutorials | Newsletter Signup | About Us
Search  

Go Back   Open Source Tutorials Forum > Programming Languages > PHP Development
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-08-2008, 12:02 AM
alecoder alecoder is offline
Junior Member
 
Join Date: Feb 2008
Posts: 1 alecoder is on a distinguished road
Default need help image resize

PHP Code:
 <form action="r.php" method="post" enctype="multipart/form-data">     <input type="file" name="file">     <input type="submit" name="submit">  </form>  <?php  if (isset($_POST['submit']))  {  $tdir "images/";  $url $_FILES['file']['name'];  include ("komarov/config.php");  $query mysql_query ("SELECT MAX(id) FROM `users`");  $result mysql_fetch_array ($query);  $id $result['MAX(id)'];  $name $id.$_FILES['file']['name'];  $file "images/".$name;  copy ($_FILES['file']['tmp_name'], "images/".$id.$_FILES['file']['name']);      list($width$height) = getimagesize($file);  $sizex 500;  $sizey 500;    $dimg imagecreate($sizex$sizey);  $image imagecreatetruecolor($width$height);  $image2 imagecreatefromjpeg($file);  imagecopyresampled($image$image20000$sizex$sizey$width$height);  imagejpeg($dimg$tdir $url75);       }  ?> 




why don't working ?
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 07:06 AM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.