Hi guys
I hope everyone is doing well.
I'm new to Web programming and I have stick with PHP error, I don't know what have done wrong, can you please help out
here is my codes
<html>
<head>
<link rel="stylesheet" type="text/css" href="access.css">
</head>
<body>
<h1 class="green">PHP and Oracle databases</h1>
<h4>Table: <em>Plants</em></h4>
<div align="center">
<table width="850" border="0" bgcolor="#339933" cellpadding="5" cellspacing="1">
<tr bgcolor="#006633">
<td width="75" style="color:#ffff99">Drainage</td>
<td width="75" style="color:#ffff99">Aspect</td>
<td width="100" style="color:#ffff99">Temperature</td>
<td width="75" style="color:#ffff99">Height</td>
<td width="75" style="color:#ffff99">Foliage</td>
<td width="200" style="color:#ffff99">Common Name</td>
<td width="250" style="color:#ffff99">Species Name</td>
</tr>
<?php
while(oci_fetch_array($stmt)) {
echo("<tr valign=top bgcolor=#ccffcc>");
$fg1 = oci_result($stmt,"DRAINAGE"); //"Drainage";
echo("<td width=75>");
echo ($fg1);
echo("</td>");
$fg2 = oci_result($stmt,"ASPECT");//"Aspect";
echo("<td width=75>");
echo ($fg2);
echo("</td>");
$fg3 = oci_result($stmt,"TEMPERATURE");//"Temperature";
echo("<td width=75>");
echo ($fg3);
echo("</td>");
$fg4 = oci_result($stmt,"HEIGHT");//"Height";
echo("<td width=75>");
echo ($fg4);
echo("</td>");
$fg5 = oci_result($stmt,"FOLIAGE");//"Foliage";
echo("<td width=75>");
echo ($fg5);
echo("</td>");
$fg6 = oci_result($stmt,"COMMONNAME");//"CommonName";
echo("<td width=250>");
echo ($fg6);
$fg8 = oci_result($stmt,"PHOTO");//"Photo";
// Pictures are in a 'plants' sub-directory elsewhere on the server, so use the full URL
echo ("<br><img src=http://www.deakin.edu.au/~jmalm//plant_pics/".$fg8."><br>");
echo("</td>");
$fg7 = oci_result($stmt,"SPECIESNAME");//"SpeciesName";
echo("<td width=250><em>");
echo ($fg7);
echo("</em></td>");
echo("</tr>");
// Close the connection
oci_close($connect);
}
?>
</table>
</div>
</body>
</html>
the error says Warning: oci_fetch_array() expects parameter 1 to be resource, null given in /home/jmalm/public_html/plant_pics/practical7.php on line 35
im trying to retrieve information from my database (MySQL) but im stick with error
can some explain to me why I am getting this error
Thanks in advanced