View Single Post
Old 04-10-2009, 09:55 AM   #2 (permalink)
sjaq
The Acquainted
 
sjaq's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 113
Thanks: 11
sjaq is on a distinguished road
Default

PHP Code:
<?php 

    $con
=mysql_connect($hostName,$user,$password); 
    
    if(!
$con) { 
        die 
"connection failed"
    } 
    
    
mysql_select_db($dbName,$con); 
    
$sql="select * from market_details";
    
$result mysql_query($sql);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body>
        <p>
        </p>
        <table cellpadding="0" cellspacing="0" border="0">
            <thead>
                <tr>
                    <th>
                        Market Code
                    </th>
                    <th>
                        Market Name
                    </th>
                </tr>
            </thead>
            <tbody>
                <?php 
                    
while($row=mysql_fetch_array($result,$con)) 
                    { 
                
?>
                <tr class="gradeA">
                    <td class="center">
                        <?php echo $row['market_code']; ?>
                    </td>
                    <td class="center">
                        <?php echo $row['market_name']; ?>
                    </td>
                </tr><?php 
                     
}         
                
?>
            </tbody>
        </table>
    </body>
</html>
sjaq is offline  
Reply With Quote