php/mysql code segment quite working

I must be tired, I have been working on this code segment for some time.  It was working, and I was cleaning it up (the output) when it just quit working.  Now I just cannot seem to see where I screwed it up.

Any assistance would be appriciated.

The code segment is below:

<?php
include("prosVars.inc");

$con = mysql_connect($host, $user,$passwd);
mysql_select_db($database, $con) or die ("Couldn't select database.");



$result = mysql_query("SELECT * FROM prospects ORDER BY dis ASC LIMIT 1,85");



echo "<table border='1'>"
<tr>
<th>ID</th>
<th>Firstname</th>
<th>Lastname</th>
<th>District</th>
<th>Unit</th>
<th>Home Phone</th>
<th>Cell Phone</th>
<th>email</th>
<th>Notes</th>
</tr>;

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['id'] . "</td>";
  echo "<td>" . $row['fn'] . "</td>";
  echo "<td>" . $row['ln'] . "</td>";
  echo "<td>" . $row['dis'] . "</td>";  
  echo "<td>" . $row['u'] . "</td>";
  echo "<td>" . $row['hp'] . "</td>";
  echo "<td>" . $row['cp'] . "</td>";
  echo "<td>" . $row['email'] . "</td>";
  echo "<td>" . $row['Notes'] . "</td>";  
  echo "</tr>";
  }
echo "</table>";


mysql_close($con);
?>
dibrandtAsked:
Who is Participating?
 
4e4enCommented:
<?php
include("prosVars.inc");

$con = mysql_connect($host, $user,$passwd);
mysql_select_db($database, $con) or die ("Couldn't select database.");



$result = mysql_query("SELECT * FROM prospects ORDER BY dis ASC LIMIT 1,85");



echo "<table border='1'>
<tr>
<th>ID</th>
<th>Firstname</th>
<th>Lastname</th>
<th>District</th>
<th>Unit</th>
<th>Home Phone</th>
<th>Cell Phone</th>
<th>email</th>
<th>Notes</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['id'] . "</td>";
  echo "<td>" . $row['fn'] . "</td>";
  echo "<td>" . $row['ln'] . "</td>";
  echo "<td>" . $row['dis'] . "</td>";  
  echo "<td>" . $row['u'] . "</td>";
  echo "<td>" . $row['hp'] . "</td>";
  echo "<td>" . $row['cp'] . "</td>";
  echo "<td>" . $row['email'] . "</td>";
  echo "<td>" . $row['Notes'] . "</td>";  
  echo "</tr>";
  }
echo "</table>";


mysql_close($con);

Open in new window

0
 
Dave BaldwinFixer of ProblemsCommented:
@4e4en is right, you had the ending double quote after the first 'echo' in the wrong place.
0
 
dibrandtAuthor Commented:
That's what a fress set of eyes can do!!

Thanks all.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.