I am not able to get any help from anywhere I tried it a lot I hope someone from DP will help me. Can someone tell me how can I connect oracle and php?
You will have to install the OCI8 extension - there are other ways but this is by far your best bet. What host are you running this on? If they do not have support for it already you may find you have trouble setting it up. You can find out if its already enabled by checkiung phpinfo(). If its your own server or one you have root access too (and its not enabled) you need to recompile it with; --with-oci8=shared,instantclient,/path/to/your-instant-client-libs
a sample code $dbHost = "localhost"; $dbHostPort="1521"; $dbServiceName = "orcl"; $usr = "hr"; $pswd = "hr"; $dbConnStr = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=".$dbHost.")(PORT=".$dbHostPort.")) (CONNECT_DATA=(SERVICE_NAME=".$dbServiceName.")))"; if(!$dbConn = oci_connect($usr,$pswd,$dbConnStr)) { $err = oci_error(); trigger_error(‘Could not establish a connection: ‘ . $err[‘message'], E_USER_ERROR); }; $strSQL = "SELECT TO_CHAR(SYSDATE, ‘HH:MI:SS') ctime FROM DUAL"; $stmt = oci_parse($dbConn,$strSQL); if (!oci_execute($stmt)) { $err = oci_error($stmt); trigger_error(‘Query failed: ‘ . $err[‘message'], E_USER_ERROR); }; oci_fetch($stmt); $rslt = oci_result($stmt, ‘CTIME'); print "<h3>The current time is ".$rslt."</h3>"; Code (markup):