Código PHP:
<?php
include ("ocassion_text.php");
include ("no_cache.php");
include ("calc_time1.php");
$query_user = $_GET['user'];
include("connect_db.php");
$link = connect_db();
$result = mysql_query("SELECT * FROM invoice WHERE LoggedUser = '$query_user'",$link);
$array = mysql_fetch_array($result);
?>
<html>
<head>
<title>C. E. S. F. A | Preview User Records</title>
<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
<link type="image/x-icon" href="favicon.ico" rel="shortcut icon">
</head>
<body bgcolor="#8f8f8f">
<br><br>
<table align="center" width="70%" bgcolor="#00CCFF" border="1" bordercolor="#000000">
<tr>
<td align="center">
<?php echo WEBSITETITLE; ?>
</td>
</tr>
<tr>
<td align="center">
<h1><label><?php echo VIPU; ?></label>
</h1>
<form method="get" action="preview_user_insert.php">
<input type="radio" name="user" value="ender">Ender
<input type="radio" name="user" value="gloria">Gloria
<input type="radio" name="user" value="joice">Joice
<br><br>
<input type="submit" value="Check Records">
</form>
</td>
</tr>
</table>
<?php if (isset($_GET['user']))
{
echo "<hr><table align=\"center\" border=\"1\" cellpadding=\"1\" cellspacing=\"1\" width=\"80%\">
<tr align=\center\">
<td class=\"resultheader\">Id</td>
<td class=\"resultheader\">Date</td>
<td class=\"resultheader\">Customer</td>
<td class=\"resultheader\">Address</td>
<td class=\"resultheader\">Phone</td>
<td class=\"resultheader\">Quantity</td>
<td class=\"resultheader\">Description</td>
<td class=\"resultheader\">Price</td>
<td class=\"resultheader\">Total</td>
</tr>";
}
?>
<?php while($array = mysql_fetch_array($result)) {
echo '<tr align=center><td>';
echo $array['IdInvoice']." </td><td>";
echo $array['DateInvoice']." </td><td>";
echo $array['CustomerInvoice']." </td><td>";
echo $array['AddressInvoice']." </td><td>";
echo $array['PhoneInvoice']." </td><td>";
echo $array['QuantityInvoice']." </td><td>";
echo $array['DescriptionInvoice']." </td><td>";
echo $array['PriceUnitInvoice']." </td><td>";
echo $array['PriceTotalInvoice']." </td></tr>";
}
?>
<?php if (isset($_GET['user']))
{
echo "</table>";
}
?>
<hr>
<?php echo WEBSITECREDIT; ?>
</body>
</html>
<?php
include ("calc_time2.php");
echo GENTIME. $gen_timeReal .GEN_TIME ;
?>