<?php
include('connect.php');
mysql_select_db("gracom1_widgets", $con) or die(mysql_error());
$result = mysql_query("SELECT * FROM customers INNER JOIN states on states.stateID = customers.stateID WHERE custID = '$_GET[custID]'") or die(mysql_error());
echo "<table>
<tr>
<th>Customer Name</th>
<th>Phone</th>
<th>Email</th>
<th>Address</th>
<th>State</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['custName'] . "</td>";
echo "<td>" . $row['custPhone'] . "</td>";
echo "<td><a href='mailto:" . $row['custEmail'] . "'>" . $row['custEmail'] . "</a></td>";
echo "<td>" . $row['custAddress'] . "</td>";
echo "<td>" . $row['stateName'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
include('connect.php');
mysql_select_db("gracom1_widgets", $con) or die(mysql_error());
$result = mysql_query("SELECT * FROM customers INNER JOIN states on states.stateID = customers.stateID WHERE custID = '$_GET[custID]'") or die(mysql_error());
echo "<table>
<tr>
<th>Customer Name</th>
<th>Phone</th>
<th>Email</th>
<th>Address</th>
<th>State</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['custName'] . "</td>";
echo "<td>" . $row['custPhone'] . "</td>";
echo "<td><a href='mailto:" . $row['custEmail'] . "'>" . $row['custEmail'] . "</a></td>";
echo "<td>" . $row['custAddress'] . "</td>";
echo "<td>" . $row['stateName'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>