title: how to display duplicate email address
body: <pre><code>$sql ="SELECT u.Contact_Email FROM email1 AS u UNION ALL SELECT e.Contact_Email FROM email2 AS e"; $result = mysql_query($sql);
   $yes = 'yes';
   $no = 'no';
   echo "&lt;table&gt;&lt;tr&gt;&lt;th&gt;Email&lt;/th&gt;&lt;th&gt;email 1 opened&lt;/th&gt;&lt;th&gt;email 1 clicked&lt;/th&gt;&lt;th&gt;email2 opened&lt;/th&gt;&lt;th&gt;email2 clicked&lt;/th&gt;&lt;th&gt;email3 opened&lt;/th&gt;&lt;th&gt;email4 opened&lt;/th&gt;&lt;th&gt;email 4 clicked&lt;/th&gt;&lt;th&gt;email 5 opened&lt;/th&gt;&lt;th&gt;email 5 clicked&lt;/th&gt;&lt;th&gt;email 6 opened&lt;/th&gt;&lt;th&gt;email 6 clicked&lt;/th&gt;&lt;/tr&gt;&lt;tbody&gt;";
   while($row = mysql_fetch_array($result)) {
              $d_name = $row['Contact_Email'];
      ?&gt; 
            &lt;tr&gt;
              &lt;td&gt;&lt;?php echo $d_name; ?&gt;&lt;/td&gt;
              &lt;?php if($row['Contact_Email']  == $row['Contact_Email']){
              echo "&lt;td&gt;yes&lt;/td&gt;";
              } else if ($row['Contact_Email']  == 0){
              echo "&lt;td&gt;no&lt;/td&gt;";
              }    ?&gt;
              &lt;td&gt;&lt;?php echo $yes; ?&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;?php } ?&gt;
             &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>this is my php script. I have a 11 table email1, email2, email3, ... email11<br>
  join table and show duplicate email as 'yes' else 'no'
  i want this output whats i am doing??<br>
  <a href="http://i.stack.imgur.com/nttMp.png" rel="nofollow">Output like this</a></p>