|
-
Oct 19th, 2007, 10:53 AM
#1
Thread Starter
Lively Member
Php and Oracle 9i
Hi all, I m totally new to PHP and i have to connect to oracle via php. I have Apache server running on my machine and php installed. But I am not able to connect to oracle via a sample PHP code. Can you pls guide me through. My code looks something like this.
<html>
If PHP is working, you will see "Hello World" below:<hr>
<?php
$conn = oci_new_connect('testdb, 'testdb123', 'testdb');
$stid = oci_parse($conn, 'select sysdate from dual');
oci_execute($stid);
print '<table border="1">';
while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS))
{ print '<tr>';
foreach ($row as $item)
{
print '<td>'.($item?htmlentities($item):' ').'</td>';
}
print '</tr>'; }
print '</table>'; ?>
</html>
only this line appears : "If PHP is working, you will see "Hello World" below:" Any help pls ..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|