<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <title>MobiFind Emails Table</title>
  </head>
  <body bgcolor="#FFFF99">
    <table border="1" width="75%" cellpadding="2" cellspacing="2"> 
    <tr> 
    <td align="center">id</td> 
    <td align="center">imei</td> 
    <td align="center">email</td> 
    </tr> 
    <?php 
    $host = "localhost"; 
    $user = "lottery_thomas"; 
    $pass = "Lts33922"; 
    $dbname = "lottery_mobifind_email"; 
    
    $connection = mysql_connect($host,$user,$pass) or die (mysql_errno().": ".mysql_error()."<BR>"); 
    mysql_select_db($dbname); 
    //Query that is being run 
    $query= "SELECT id,imei,email FROM mobifind_email WHERE imei <> \"\""; 
    //this will try to spit out the previous sql query 
    $result = mysql_query($query) or die('Query failed: ' . mysql_error()); 
    //this is a line break before the spit output 
    
    while ($line = mysql_fetch_row($result) ) 
        { 
        if($line[0] <> 0)
            {
            echo '<tr>'; 
            echo '<td align="center">'.$line[0].'</td>'; 
            echo '<td align="center">'.$line[1].'</td>'; 
            echo '<td align="center">'.$line[2].'</td>'; 
            echo '</tr>'; 
            }
        }
    ?> 
    </table> 
  </body>
</html>
