0

Before you sent that message, here is what I did, and it works good now. Thanks for everyone's advice and help:

<?php
// Include connection to your database
$con = mysql_connect("localhost","root","");
mysql_select_db("RUNNERS", $con) or die(mysql_error());

$name = $_POST['first_name']; 
$query = "SELECT * FROM runners WHERE first_name ='".$name."'"; 
$result = mysql_query($query) or die(mysql_error());



echo "<table class='sortable'>";
while ($list = mysql_fetch_assoc($result)) {
echo "<thead>";
echo "<tr>";
echo "<th>ID #</th>";
echo "<th>First Name</th>";
echo "<th>Last Name</th>";
echo "<th>1 Mile</th>";
echo "<th>2 Mile</th>";
echo "<th>5k</th>";
echo "<th>10k</th>";
echo "<th>15k</th>";
echo "<th>20k</th>";
echo "<th>13.1</th>";
echo "<th>26.2</th>";
echo "</tr>";
echo "</thead>";

echo "<tbody>";
echo "<tr>";
echo "<th>" . $list['id'] . "</th>";
echo "<th>" . $list['first_name'] . "</th>";
echo "<th>" . $list['last_name'] . "</th>";
echo "<th>" . $list['one'] . "</th>";
echo "<th>" . $list['two'] . "</th>";
echo "<th>" . $list['five'] . "</th>";
echo "<th>" . $list['ten'] . "</th>";
echo "<th>" . $list['fifteen'] . "</th>";
echo "<th>" . $list['twenty'] . "</th>";
echo "<th>" . $list['half'] . "</th>";
echo "<th>" . $list['full'] . "</th>";
echo "</tr>";


echo "</tbody>";
}
?>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.