Passing value on img src $_GET issue
<p>I am passing values from the img src like this:</p>

<p>PageA:</p>

<pre><code>&lt;img src="watermark.php?fname=&lt;?php echo $image; ?&gt;" /&gt;
</code></pre>

<p>then I ge the value on pageB:</p>

<pre><code>$fname = $_GET['fname'];

$watermark_img = $passed_fname;

...
</code></pre>

<p>For some reason no image is showing ... I'm I missing something here?</p>

<p>Here is pageB full code:</p>

<pre><code>&lt;?php  

$fname = $_GET['fname'];

$main_img = "Porsche_911_996_Carrera_4S.jpg"; // main big photo / picture
//$watermark_img    = "watermark.gif"; // use GIF or PNG, JPEG has no tranparency support
$watermark_img = $fname;
$padding        = 3; // distance to border in pixels for watermark image
$opacity        = 100;  // image opacity for transparent watermark

$watermark  = imagecreatefromgif($watermark_img); // create watermark
$image      = imagecreatefromjpeg($main_img); // create main graphic

if(!$image || !$watermark) die("Error: main image or watermark could not be loaded!");


$watermark_size     = getimagesize($watermark_img);
$watermark_width    = $watermark_size[0];  
$watermark_height   = $watermark_size[1];  

$image_size     = getimagesize($main_img);  
$dest_x         = $image_size[0] - $watermark_width - $padding;  
$dest_y         = $image_size[1] - $watermark_height - $padding;


// copy watermark on main image
imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $opacity);


// print image to screen
header("content-type: image/jpeg");   
imagejpeg($image);  
imagedestroy($image);  
imagedestroy($watermark);  

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