<head>
<?php $date = date( "l F d, Y" );?>
<TITLE>DEVWEB TEST - <?php print( $date );?> </TITLE>
</head>
<BODY>
<?php
$db = "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (COMMUNITY = tcp.world)(PROTOCOL = TCP)(HOST = junk)(PORT = 1521)))(CONNECT_DATA = (SID = junk)))";
$connection = OCILogon("junk","junk",$db);
if ($connection == false){
echo Ora_ErrorCode($connection).": ".Ora_Error($connection)."<BR>";
exit;
}
$query = "select FNAME_TX,EMAIL_TX from employees";
$cursor = OCIParse ($connection, $query);
if ($cursor == false){
echo OCIError($cursor)."<BR>";
exit;
}
$result = OCIExecute ($cursor);
if ($result == false){
echo OCIError($cursor)."<BR>";
exit;
}
echo "<table border=1>\n";
echo "<tr>\n<td>\n<b>Full Name</b></td>\n<td>\n<b>Email Address</b></td>\n</tr>\n";
while (OCIFetchInto ($cursor, $values)){
$name =$values[0];
$email=$values[1];
echo "<tr>\n<td>\n$name</td>\n<td>\n$email</td>\n</tr>\n";
}
echo "</table>\n";
OCILogoff ($connection);
?>
</BODY>