Location: PHPKode > projects > Micro Guestbook > index.php
<?php
    require_once('general.php');
    require_once('db/db_connection.php');

    $sql = "SELECT * FROM guestbook ORDER BY insertdate DESC";
    $result = $MyDb->f_ExecuteSql($sql);
    $recordcount = $MyDb->f_GetSelectedRows(); 
    
    
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
   <title>MicroWhois domain checker</title>
   <link href="style/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
      <div id="main">
        <a href="add.php"><img src="style/add.gif" border="0" alt="Add" /></a><h1>Guestbook</h1>
        
<?php while ($row = $MyDb->f_GetRecord($result)) { ?>

        <div id="container">
         <div id="name"><?php echo $row['name']; ?></div>
         <div id="info">
           <div id="infoicons">
             <?php 
                if (strlen($row['web']) > 5) echo '<a href="http://'.$row['web'].'"><img src="style/www.gif" /></a>';
                if (strlen($row['email']) > 5) echo '<a href="mailto:'.$row['email'].'"><img src="style/mail.gif" /></a>';
             ?>
           </div>
           <div id="infodate"><?php echo $row['insertdate']; ?></div>
         </div>  
         <div id="icon"><?php echo $row['location']; ?></div>
         <div id="text"><?php echo nl2br($row['text']); ?></div>
        </div>

<?php } ?>

        <div id="source">Micro Guestbook 1.1</div>	
      </div>
</body>
Return current item: Micro Guestbook