Blank page in browser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,

I'm new to PHP programming and I just try to display small information from
database on web page but its shows blank page. So my code is mention below
and let me know what's wrong in it but when I execute same program on
command prompt then its shows all result correctly with HTML Tags 

<?php

  PutEnv("ORACLE_SID=TSH1");
  PutEnv("ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1");
  PutEnv("TNS_ADMIN=/var/opt/oracle");

   $db_conn = ocilogon("scott", "tiger", "");

   $cmdstr = "select ename, sal from emp";
   $parsed = ociparse($db_conn, $cmdstr);
   ociexecute($parsed);
   $nrows = ocifetchstatement($parsed, $results);
   echo "Found: $nrows results<br><br>\n";

   echo "<table border=1 cellspacing='0' width='50%'>\n";
   echo "<tr>\n";
   echo "<td><b>Name</b></td>\n";
   echo "<td><b>Salary</b></td>\n";
   echo "</tr>\n";

   for ($i = 0; $i < $nrows; $i++ ) {
         echo "<tr>\n";
         echo "<td>" . $results["ENAME"][$i] . "</td>";
         echo "<td>$ " . number_format($results["SAL"][$i], 2). "</td>";
         echo "</tr>\n";
   }

   echo "</table>\n";

   ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux