0

how can i create automatically tumbling .. I need when i upload original image automatically create thumb and add thumb ( size 200 x 200 ) in folder and insert path of thumb in database $thumb .. i need help .. any one can help me ?

    <?php
error_reporting(0);
if ($_POST['submit'])
{
  $name=basename($_FILES['file_upload']['name']);   
  $t_name=$_FILES['file_upload']['tmp_name'];
  $dir='upload';
  $image_title=$_POST['image_title'];
  $image_details=$_POST['image_details'];
  $image_text=$_POST['image_text'];
  $cat=$_POST['cat'];
  $thumb=$_POST['thumb'];

if(move_uploaded_file($t_name,$dir."/".$name))
   {
mysql_select_db ($db_name,$conn);
$qur="insert into images (mid, cid, name, path, image_title, image_details, image_text, thumb, addGby, addGon) 
values('','$cat','$name','upload/$name','$image_title','$image_details','$image_text','$thumb','$session_name',now())";
$res=mysql_query($qur,$conn);
echo 'File Upload sussfully';
}
else
{
echo 'upload filed!';
}
}
?>



<form method="post" action="Addgallery.php" enctype="multipart/form-data">

<div class="field">
<label>image : </label>
<input type="file" class="custom-file-input" name="file_upload" id="file_upload"  />
</div>

<div class="field fullwidth last">
<input type="submit" name="submit" value="upload" class="bt blue large"  />
</div>
</form>
2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Squidge
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.