title: linking jpeg image in html to php code
body: <p>im creating a website which includes a button (JPEG image) that will locate ('a ref') a php file. I need the php to be called when the 'email.jpg' button is clicked on but only shows up as pure text in a web browser. any ideas on how to resolve this? any help is much appreciated! thanks</p>
  
  <p><strong>MAIN HTML SITE CODE</strong></p>
  
  <pre><code>&lt;div id="content-container"&gt;
  
        &lt;p align="center"&gt;&lt;a href="video.mp4" class="html5lightbox"  data-width="720" data-height="404"&gt;&lt;img src="bg.jpg" width="1023" height="820" id="imgvideo" /&gt;&lt;/a&gt;          
      &lt;div align="center"&gt;
        &lt;table width="1027" height="46" border="0" cellpadding="0px"&gt;
            &lt;tr&gt;
              &lt;td&gt;&lt;a href="mail.php"&gt;&lt;img src="email.png" width="130" height="46" /&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p><strong>PHP FILE CODE (mail.php)</strong></p>
  
  <pre><code> &lt;?php 
  
  /*EMAIL TEMPLATE BEGINS*/ 
  
  $imgSrc   = 'bg.jpg'; 
  $imgDesc  = 'test_sell_new/'; 
  $imgTitle = 'bg.jpg'; 
  
  $subjectPara1 = 'Now Available'; 
  $subjectPara2 = NULL; 
  $subjectPara3 = NULL; 
  $subjectPara4 = NULL; 
  $subjectPara5 = NULL;
  
  $message = '&lt;!DOCTYPE HTML&gt;'.
  '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'.
  '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;'.
  '&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;'.
  '&lt;head&gt;'.
  '&lt;title&gt;Available Now&lt;/title&gt;'.
  '&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;'.
  '&lt;/head&gt;'.
  
  '&lt;body style="background-color:#ffffff; padding:0; margin:-10px 0 0 0; _margin:0 0 0 0; *margin:0 0 0 0; text-align:center;"&gt;'.
  '&lt;table border="0" cellpadding="0" cellspacing="0" width="1024" style="background-color:#ffffff; font-family:Arial, Helvetica, sans-serif; font-size:10px; padding-top:0px; margin:auto;"&gt;'.
      '&lt;tr&gt;'.
          '.&lt;td&gt;&lt;a href="index.html" style="text-decoration:none"&gt;&lt;p style="color:#000000; text-align:center; margin:10px 0 0 0; *margin:0 0 0 0; _margin:0 0 0 0; font-family:Arial, Helvetica, sans-serif; font-size:11px;"&gt;Having trouble viewing this message? Click here.&lt;/p&gt;&lt;/a&gt;&lt;/td&gt;'.
      '&lt;/tr&gt;'.
      '&lt;tr&gt;'.
          '&lt;td&gt;'.
              '&lt;table border="0" cellspacing="0" cellpadding="0" width="100%" height="820"&gt;'.
                  '&lt;tr&gt;'.
                      '&lt;td&gt;'.
                      '&lt;a href="index.html"&gt;&lt;img src="bg.jpg" width="1024" height="820" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;'.
                      '&lt;/td&gt;'.
                  '&lt;/tr&gt;'.
              '&lt;/table&gt;'.
          '&lt;/td&gt;'.
      '&lt;/tr&gt;'.
  '&lt;/table&gt;'.
  '&lt;/body&gt;'.
  
  /*EMAIL TEMPLATE ENDS*/ 
  
  $to      = 'test@madeup.com';            
  $subject = 'IT WORKS!';   
  $from    = 'test@madeup.com';                            
  
  $headers  = "From: " . $from . "\r\n"; 
  $headers .= "Reply-To: ". $from . "\r\n"; 
  $headers .= "CC: test@example.com\r\n"; 
  $headers .= "MIME-Version: 1.0\r\n"; 
  $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; 
  
  ?&gt;
  </code></pre>