Location: PHPKode > scripts > roundbase data interface > roundbase-data-interface/results.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 include ('config.php');
 include ('prefs.php');
<html xmlns="http://www.w3.org/1999/xhtml">

		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<meta name="generator" content="Adobe GoLive" />
		<title><?php echo "$title" ?> | results</title>
		<link href="style.css" rel="stylesheet" type="text/css" media="all" />
		<style type="text/css" media="screen"><!--
.default { font-family: "trebuchet ms"; }
a:link { color: blue ; text-decoration: none; }
a:visited { color: #00f ; text-decoration: none; }
a:hover { color: #008000 ; text-decoration: none; }
a:active { color: red ; }

	<body bgcolor="gray">
		<div class="default" align="center">
			<?php include "header.php"?>
			<h1>10 Results</h1>
$dbh=mysql_connect ("localhost", "$user", "$pass") or die ('I cannot connect to the database because: ' . mysql_error());
 mysql_select_db ("$database");
$query = 'select * from data order by id desc limit 10';
 $result = mysql_query($query);
while ($r = mysql_fetch_array($result))
 $fld1= $r["fld1"];
 $fld2= $r["fld2"];
 $fld3= $r["fld3"];
 $id= $r["id"];

 echo "			<table width=\"337\" border=\"1\" cellspacing=\"2\" cellpadding=\"0\">

				<td colspan=\"4\" bgcolor=\"#09b6c1\"><font color=\"black\"> $fld1</font></td>
				<td bgcolor=\"#0981c1\" width=\"31\"><font color=\"black\">$id</font></td>
				<td colspan=\"3\" bgcolor=\"#0981c1\"><font color=\"black\">$fld2</font></td>
				<td colspan=\"4\" bgcolor=\"#0981c1\"><font color=\"black\">$fld3</font></td>
 }//end while

Return current item: roundbase data interface