Link to home
Start Free TrialLog in
Avatar of dibrandt
dibrandt

asked on

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);
?>
ASKER CERTIFIED SOLUTION
Avatar of 4e4en
4e4en
Flag of Latvia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dave Baldwin
@4e4en is right, you had the ending double quote after the first 'echo' in the wrong place.
Avatar of dibrandt
dibrandt

ASKER

That's what a fress set of eyes can do!!

Thanks all.