Unable to attach file name
<pre><code>&lt;?php

$con = mysql_connect("localhost","root","");
mysql_select_db("image", $con);

 if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
    $result = mysql_query("SELECT * FROM image ORDER BY file_name DESC LIMIT 1");

    $row = mysql_fetch_array($result);
    $src = '"'.$row['file_name'].'"';
    $targ_w = $targ_h = 300;
    $jpeg_quality = 90;

    $img_r = imagecreatefromjpeg($src);
    $dst_r = ImageCreateTrueColor( $targ_w, $targ_h );

    imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],
    $targ_w,$targ_h,$_POST['w'],$_POST['h']);

    header('Content-type: image/jpg');
    imagejpeg($dst_r,null,$jpeg_quality);

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

<p>I am able to retrieve the file_name from the database by echoing, but i am unable to attach the file at this part <code>$img_r = imagecreatefromjpeg($src);</code> this is where it causes errors?
any idea?</p>
