처음으로 여기에 포스터.PHP 테이블에 데이터베이스 데이터 표시
저는 현재 uni에 대한 과제를 진행하고 있습니다. 그것의 일부로 데이터베이스에서 데이터를 추출하고 이전 페이지의 '검색'양식에 링크 된 PHP 파일을 사용하여 요청 된 정보를 웹 페이지에 표시해야합니다.
데이터를 테이블에 표시 할 수없는 것 같습니다.
SQL 문이 올바르게 구성되었고 데이터베이스가 제대로 연결되어 연결되어 있으며 서식을 지정하는 동안 약간의 변경을 가할 때까지 이전에 작동했습니다. 내가 무엇을 말할 수 있는지는 잘 작동해야합니다. 이슈가 뭐야? 어떤 도움이라도 대단히 감사하겠습니다.
<!-- 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>");
}
?>
하품. 이 유니는 상당히 지루해야합니다. – user2314737