Hello everybody,
I am making a mistake somewhere but I am unable to figure out. The browser is not displaying the result FROM QUERY. Can somebody please look this code and point my mistake out?
<?php
if ($_POST['verify_ktl']=="ok") {
echo <<<EOD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">\n
<head>
<title>KTL - Kansanterveyslaitos</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<br />
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td align="right" valign="top" bgcolor="#FFFFFF">
<img src="ktl.gif" alt="" width="286" height="69" /></td>
</tr>
</tbody>
</table>
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td><b>Terveyskeskus/TK jako</b></td>
<td> </td>
<td> </td>
<td><b>Paikkakoodi</b></td>
<td> </td>
<td> </td>
<td><b>Sairaanhoitopiiri</b></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
EOD;
require ('access.php');
$result = mysql_query("SELECT record_id,sairaanhoitopiiri,toimipaikkatyyppi,kuntayhtym,mukanahankkeessa,yksikko,paikkakoodi,sokerirasituskokeennytteenottopa,glukoosinmritysmenetelm,yhteyshenkilo,terveyskeskus,tkjatko,katuosoite,postiosoite,puhelin,toinenyhteyshenkilo,note,toim_joh_laa FROM ktl_epshp ORDER BY ktl_epshp.paikkakoodi");
$i=0;
while ($array = mysql_fetch_array($result)) {
echo "<tr>";
echo "<td>".$array['terveyskeskus']." / ".$array['tkjatko']."</td>\n";
echo "<td> </td>\n";
echo "<td> </td>\n";
echo "<td>".$array['paikkakoodi']."</td>\n";
echo "<td> </td>\n";
echo "<td> </td>\n";
echo "<td>".$array['sairaanhoitopiiri']."</td>\n";
echo "<td> </td>\n";
echo "<td> </td>\n";
echo "<form name=\"".$i."\" action=\"view_epshp.php\" method =\"post\">";
echo "<td><input type=\"hidden\" name=\"value\" value=\"" . $array['paikkakoodi'] . "\"><input type=\"hidden\" name=\"verify_list\" value=\"ok\"</td>";
echo "<td><input type=\"submit\" value=\"View\"></td>";
echo "</form>";
echo "</tr>\n";
$i++;
}
$result1 = mysql_query("SELECT record_id,sairaanhoitopiiri,toimipaikkatyyppi,kuntayhtym,mukanahankkeessa,yksikko,paikkakoodi,sokerirasituskokeennytteenottopa,glukoosinmritysmenetelm,yhteyshenkilo,terveyskeskus,tkjatko,katuosoite,postiosoite,puhelin,toinenyhteyshenkilo,note,toim_joh_laa FROM ktl_ksshp ORDER BY ktl_ksshp.paikkakoodi");
$i1=0;
while ($array1 = mysql_fetch_array($result1)) {
echo "<tr>";
echo "<td>".$array['terveyskeskus']." / ".$array1['tkjatko']."</td>\n";
echo "<td> </td>\n";
echo "<td> </td>\n";
echo "<td>".$array1['paikkakoodi']."</td>\n";
echo "<td> </td>\n";
echo "<td> </td>\n";
echo "<td>".$array1['sairaanhoitopiiri']."</td>\n";
echo "<td> </td>\n";
echo "<td> </td>\n";
echo "<form name=\"".$i1."\" action=\"view_epshp.php\" method =\"post\">";
echo "<td><input type=\"hidden\" name=\"value\" value=\"" . $array1['paikkakoodi'] . "\"><input type=\"hidden\" name=\"verify_list\" value=\"ok\"</td>";
echo "<td><input type=\"submit\" value=\"View\"></td>";
echo "</form>";
echo "</tr>\n";
$i1++;
}
echo <<<EOD
</tbody>
</table>
EOD;
}
else {
echo <<<EOD
Direct access is denied.
<br />
EOD;
}
?>