First time poster here.
I'm currently working on an assignment for uni. As part of it, I have to extract data from a database and display the requested information on the web page using a PHP file, linked to a 'search' form on the previous page.
I can't seem to get the data to display into the table though.
The SQL statement has been constructed correctly, the database has been properly linked to and connected to, and I had this working previously, until i made a small change while formatting. From what I can tell everything should be working fine. What is the issue? Any help will be greatly appreciated.
<!-- Start the main table
<?php
if ($howmany > 0) {
echo("<table width=".$tablewidth." border=0 bgcolor=#339933 cellpadding=5 cellspacing=1>");
echo("<tr bgcolor=#006633>");
echo("<td width=200 style=color:#ffff99;text-align:center>Item Name</td>");
echo("<td width=200 style=color:#ffff99;text-align:center>Item Price</td>");
if ($PHOTO != "") echo("<td width=200 style=color:#ffff99;text-align:center>Photo</td>");
if ($DESCRIPT != "") echo("<td width=200 style=color:#ffff99;text-align:center>Item Description</td>");
}
?>
<?php
while(OCIFetch($stmt))
{
// Start a row for each record
echo("<tr valign=top bgcolor=#ccffcc>");
// Output fields, one per column
// Name in column one
$fg6 = OCIResult($stmt, "ITEM");
echo("<td width=200 align=center>");
echo ($fg6);
echo("</td>");
// Price in column two
$fg7 = OCIResult($stmt, "PRICE");
echo("<td width=200 align=center>");
echo ($fg7);
echo ("</td>");
// Photo in column three
if ($PHOTO != "")
{
// Pictures are in assignment 2 stage 2 directory
$fg1 = OCIResult($stmt, "PHOTO");
echo("<td width=200 align=center>");
echo ("<br><img src=MYUNI/ASSIGNMENT/IMAGESOURCES/".$fg1."><br>");
echo ($fg1);
echo("</td>");
}
// Description in column four
if ($DESCRIPT != "")
{
$fg2 = OCIResult($stmt,"DESCRIPT");
echo("<td width=200 align=center>");
echo ($fg2);
echo("</td>");
}
// End the row
echo("</tr>");
}
// Close the connection
OCILogOff ($connect);
?>
<!-- Close the table itself -->
<?php
if ($howmany>0) {
echo("</table>");
echo("</div>");
}
?>