Jump to content

[SOLVED] Blank Result


june_c21

Recommended Posts

hi, my another problem is i check the sql line in phpmyadmin and it display result and work perfectly but when i run in IE and click on submit button it came out blank (no result) here is my code. pls help and guide me. thanks in advance

 

html code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>RCA</title>
<style type="text/css">
<!--
.style1 {
font-size: 24px;
color: #FF0000;
}
.style2 {font-size: 36px; }
.style3 {font-size: 14px; color: #000000; }
-->
</style>
</head>

<body>
<p align="center" class="style2">KEV RCA Database</p>
<p align="center" class="style1">To purpose prevention, not blame </p>
<p align="center" class="style1"> </p>
<form id="form1" name="form1" method="post" action="rca.php">
  <label>
  <div align="center"><strong>GF</strong>
    <select name="GF">
      <option value="GF1">GF1</option>
      <option value="GF2">GF2</option>
      <option value="GF3">GF3</option>
      <option value="GF4">GF4</option>
      <option value="BSS">BSS</option>
      <option value="FS">FS</option>
      <option value="Safety">Safety</option>
      <option value="All">All</option>
    </select>
    <br />
    <strong>Year</strong>
  <select name="Year">
    <option value="2006">2006</option>
    <option value="2007">2007</option>
    <option value="2008">2008</option>
  </select>
  <br />
  <br />
  <input type="submit" name="Submit" value="Submit" />
  </div>
  </label>
</form>
<p align="center" class="style1"> </p>
<p align="center" class="style1"> </p>
<p align="right" class="style3"> For inquires , kindly contact	<br />
  <strong>RCA Secretariat</a>  </strong><br /> 
Izwan / Muliyati<br />
EXT : - 116 /150 </p>
<p align="right" class="style3"><strong>Webmaster</strong><br />
June<br />
EXT :-179 </p>
<p align="center" class="style1"> </p>
<p align="center" class="style1"> </p>
</body>
</html>

 

 

php code

<style type="text/css">
<!--
.style2 {
font-family: Times News Roman;

font-size: 11px;
	}
	body {
background-color: #CCFFFF;
}
.style6 {
font-family: Arial;
font-size: 14px;
font-weight: bold;
color: #FF0000;
}
.style5 {
font-family: Arial;
font-size: 12px;
font-weight: bold;
color: #000099;
}

.style10 {font-family: Times News Roman; font-size: 12px; }

-->
</style>
<body>
<form id="form1" name="form1" method="post" action="logout.php">
  <label><div align="center">
    <p class="style6">Root Cause Analysis </p>
    <p class="style2"><a href="logout.php">Logout</a></p>
    <p align="center" class="style10"><a href="home1.html">Home</a></p>
  </div>
  <div align="center"></div>

</form> 

<?php
$host = "localhost";
$user = "root";
$password = "admin";
$dbase = "rca";
$dblink = mysql_connect($host,$user,$password);
mysql_select_db($dbase,$dblink);

$GF = $_POST ['GF'];
$Year = $_POST ['Year'];
echo "<table border=3 align=center width=100%>";
echo "<tr><td align=center><span class=style5>Reg ID.</td></span>
   <td align=center><span class=style5>Title</td></span>
   <td align=center><span class=style5>Incident Date</td></span>
   <td align=center><span class=style5>Fault Report ID</td></span>
  
   <td align=center><span class=style5>Report Received </td></span>
   
   <td align=center colspan=><span class=style5>Status </td></span>
   </tr>";

if ($GF =='1' && $Year == '2006')
{
$query = "SELECT reg_no,title1,incident_date,fault_rep_id,secr_recd,status from report where unit='1' || unit='2' ";
$result = mysql_query($query, $dblink);
while($myrow = mysql_fetch_row($result))
{

echo "<tr><td align=center><span class=style2>" . $myrow[0] . "</span</td><td align=center><span class=style2>" . $myrow[1] . "</span</td><td align=center><span class=style2>" . $myrow[2] . "</td></span><td><span class=style2>" . $myrow[3] . "</span></td><td align=center><span class=style2>" . $myrow[4] . "</span></td><td align=center><span class=style2>" . $myrow[5] . "</span></td></tr>";
    }
}



echo "</table>";

?>



Link to comment
https://forums.phpfreaks.com/topic/104154-solved-blank-result/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.