We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

php/mysql code segment quite working

dibrandt
dibrandt asked
on
Medium Priority
504 Views
Last Modified: 2013-12-12
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);
?>
Comment
Watch Question

Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Dave BaldwinFixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014

Commented:
@4e4en is right, you had the ending double quote after the first 'echo' in the wrong place.

Author

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

Thanks all.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.