php - resize and save an image?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/747101/resize-a-picture-to-a-fixed-size">Resize a picture to a fixed size</a>  </p>
</blockquote>



<p>I am using the following php code to resize (the width) and save an image, the code is working no error but the image is not getting resized.</p>

<pre><code>&lt;?php
$old_path = "users_images/".$name.".".$type;
    $new_path = "main_images/".$name.".".$type;
    $image_size = getimagesize($new_path);
    if($image_size['0'] &gt; 700){
        $image_size['0'] = 700;
        }
        rename($old_path, $new_path);// save image

?&gt;
</code></pre>

<p>basically if the image width is grater than 700 I want to set it to 700 ? what I am doing wrong ?</p>
