<?php>
$db_conn = ocilogin (scott,tiger);
$cmdstr = select ename,sal  from emp;
$parsed = ociparse ($db_conn , $cmdstr );
ociexecute ($parsed);
$nrows = ocifetchstatment ($parsed, $result);
echo <html><head><title>Oracle PHP Test</title></head><body>;
echo <center><h2>Oracle PHP test</h2><br>;
echo <table border=1 cellspacing = 0 width = 50%>\n;
echo <td><b>Name</b></td>\n<td><b>salary</b></td>\n</tr>;
for ($i=0 ; $i<nrows ; $i++)
{
echo <tr>\n;
echo <td> . $result[ENAME][$i].</td>;
echo <td>$.number_format ($results [SAL][$i],  2).</td>;
echo </tr>\n;
}
echo <tr><td colspan = 2> Number of rows:$nrows</td></tr></table>;
echo <br><em> If You see data, then it work.</em><br></body></html>\n;
?>
