Houdini,
here is what i have at the moment the codes doesn't have the $row[3] which is my blob field.
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL & ~E_NOTICE);
$ID = $_REQUEST[ID];
$db = mysql_select_db("clinic", $conn);
$query = "SELECT * FROM doctors Where doctors.ID = '$ID'";
if ($result = mysql_query($query)or die(mysql_error())){
while($row = mysql_fetch_row($result)){
print ("$row[1] $row[2], $row[39]<br>");
if(empty($row[36])){
} else if(empty($row[37])){
print("$row[36] <br><br>");
} else if(empty($row[38])){
print("$row[36] and $row[37]<br><br>");
} else {
print("$row[36], $row[37] and $row[38]<br><br>");
}
print ("<p>$row[4]</p><br>");
print ("Doctor of Medicine<br>");
print ("<p>$row[5]</p><br>");
print (" Postgraduate Studies<br>");
echo '<p>';
for($i=6;(isset($row[$i]) && $i < 16 );$i++){ // Start a loop at 6, and continue until $row[$i] no longer exists
if(empty($row[$i])){
} else {
echo nl2br($row[$i] ). '<br>'; // Echo the current data
echo '<br>';
}
} // and continue again at the top of the loop.
echo '</p>';
echo 'Society Memberships <br>';
echo '<p>';
for($i=16;(isset($row[$i]) && $i < 26 );$i++){ // Start a loop at 6, and continue until $row[$i] no longer exists
if(empty($row[$i])){
} else {
echo nl2br($row[$i] ). '<br>'; // Echo the current data
}
} // and continue again at the top of the loop.
echo '</p>';
echo '<br> Hospital Affiliation <br>';
echo '<p>';
for($i=26;(isset($row[$i]) && $i <36 );$i++){ // Start a loop at 6, and continue until $row[$i] no longer exists
if(empty($row[$i])){
} else {
echo nl2br($row[$i] ). '<br>'; // Echo the current data
}
} // and continue again at the top of the loop.
echo '</p>';
}
} else {
die('<p>Could not retrieve the data because: ' .mysql_error() . '</b></p>');
}
?>