title: Image resizing with PHP advice
body: <p>From previous experiences, I've noticed that I'm not very good at <em>integrating</em> 'scripts' created by others, with my own existing code, as of now. I need some advice on understanding what this person is saying about resizing images with PHP:</p>
  
  <p>In the comments, he's written:</p>
  
  <pre><code>// Parameters need to be passed in through the URL's query string:
  // image        absolute path of local image starting with "/" (e.g. /images/toast.jpg)
  // width        maximum width of final image in pixels (e.g. 700)
  // height       maximum height of final image in pixels (e.g. 700)
  </code></pre>
  
  <p>Then, he gives an actual example, also as a comment:</p>
  
  <pre><code>// Resizing and cropping a JPEG into a square:
  // &lt;img src="/image.php/image-name.jpg?width=100&amp;amp;height=100&amp;amp;cropratio=1:1&amp;amp;image=/path/to/image.jpg" alt="Don't forget your alt text" /&gt;
  </code></pre>
  
  <p>I am guessing, he wants the user of the script to have something similar to the above <code>img src</code>. So, my question is: How will I actually make the source of my pictures similar to the example above? Below is some of the code I have. It shows how I am saving the pictures and HOW I am echoing/displaying them. It's from <code>uploader.php</code>:</p>
  
  <pre><code>move_uploaded_file($_FILES["file"]["tmp_name"],
        "profileportraits/" . $_FILES["file"]["name"]);
        echo "Stored in: " . "profileportraits/" . $_FILES["file"]["name"]; 
  </code></pre>
  
  <p>Once the photo has been saved in the folder, I save the file path in a MySQL table and later call the file path to display the picture (Below Code). It's from <code>profile.php</code></p>
  
  <pre><code>echo "&lt;img src=\"{$row['PortraitPath']}\" /&gt;";
  </code></pre>
  
  <p>Therefore, how will I pass the parameters similar to the one in the 'script example' if I am using the above img src to display the 'actual' picture?</p>
  
  <p>THANK YOU. </p>