PHP - Oracle

This page contains some useful links to PHP and a few PHP examples with the source codes.

PHP - Links


PHP - Oracle - Examples

The examples are specific to our database class. If you want to connect to another database, change 'cs482' to the correct service name. You can try out the code by click on 'click here'. To get the source code, download the file and save it to the file name as indicated by the link.
Program Purpose See it works Download Assumption
Processing Rows Login to Oracle and Display a pre-selected table click here password.php and the accompany action.php A table named PI with three fields IID, OID, ICOST exists
Rows and Columns Login to Oracle and Display a selected table click here password1.php and the accompany action1.php The table name should be correct
Query Login to Oracle and Display the Result of a Query click here password2.php and the accompany action2.php The query is correct
Insert (Ugly program) Login to Oracle and Insert a tuple into a table click here password3.php and the accompany action3.php Table PO with fields OID, EID, SIP exists
Insert (Using PHP function) Login to Oracle and Insert a tuple into a table click here password4.php and the accompany action4.php Table PO with fields OID, EID, SIP exists

Note: If the query is not correct or the tables are not present then you will not see the sentence "If you see data, then it works!" at the end of the page. One should check for error!

A more complicated example is the OracleEditor.php by Tim Strehle which I found on the PHP website. You can enter your Oracle's username, Oracle's password, and 'cs482' as the service to see your database.


Last modified: Tue Nov 02 11:05:35 Mountain Standard Time 2004