0

Im having issues with my while loop it doesn't produce anything comes up with empty page. I change the names to match what i have in the database but still nothing. The names of the columns are: tutor_name,tutor_email,course_code,comments,id. ive tried removing it and testing but its just the while loop not working. this is what ive got.

     while ($icount < $num)
   {
     $hieght = 75;
     $width = 95;
     $imagepath = mysql_result($result,$icount,"image_id");
     $id = mysql_result($result,$icount,"id");
     echo "<tr>"; 
     echo "<td> ".mysql_result($result,$icount,"name") . "</td><td>                     .mysql_result($result,$icount,"phone"). "</td><td> " . mysql_result($result,$icount,"address")."</td>";
     echo "<td align='center'><img src=\"image/$imagepath\"  height=".$hieght." width=".$width."></td>";
     echo "<td align='center'> <a href=\"update.php?id=$id\"> Update </a> - <a href=\"delete.php?id=$id\">Delete</a></td>";
     echo "<tr>";
     $icount++;
    }
   echo "<tr><td colspan='5' align='center'> You have ".$icount." tutors in your contact table </td> </tr>";
   echo "<tr><td colspan='5' align='center'> <a href='index.php'>Go to Home page</a> </td> </tr>";

echo "";

Fiona
  • 1
  • 1

0 Answers0