title: Fill table with result from Oracle SQL query in PHP (adobe.inc.php included)
body: <p>I'm trying to fill a table with the result from a certain SQL query, but I dont know why it doesnt work, heres my code:</p>
  
  <pre><code>&lt;?
  
  if(!ceklogin()){
  header("Location:index.php");
  }
  ?&gt;&lt;?
  
  ?&gt;
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;MSystem&lt;/title&gt;
      &lt;link rel=stylesheet type="text/css" href="style.css"&gt;
      &lt;LINK href="gaya.css" type=text/css rel=stylesheet&gt;
  &lt;/head&gt;
  &lt;?
      //$cfgProgDir = 'phpSecurePages/phpSecurePages/';
      //include($cfgProgDir . "secure.php");
      include_once("top4.htm");
      include_once("conn.php");
      $datenow = getdate();
  ?&gt;
  
  &lt;script type="text/javascript" src="js/calendarDateInput.js"&gt;
  
  &lt;/script&gt;
  
  &lt;body class="bg"&gt;
  
  &lt;table align="center"&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;p align="center"&gt;&lt;strong&gt;&lt;font color="#000000" size="2"&gt;TITLE&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;p align="center"&gt;&lt;strong&gt;&lt;font color="#000000" size="3"&gt; SMALL TITLE&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;p align="center"&gt;&lt;strong&gt;&lt;font color="#000000" size="2"&gt;Date: &lt;? echo $v_date ?&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;p align=center&gt;&lt;strong&gt;&lt;font color=#000000 size=2&gt;SMALLER TITLE&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;img src="img/batas.jpg" width="750" height="1" &gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;br&gt;
  &lt;table class=table width="750" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor=black bgcolor="#DDDDDD" BORDER-COLLAPSE"collapse"&gt;
  
  ////////// THIS IS THE TABLE
  
  &lt;tr&gt;
      &lt;td bgcolor=#444444 align=center&gt;&lt;font color=white&gt;Date&lt;/font&gt;&lt;/td&gt;
      &lt;td bgcolor=#444444 align=center&gt;&lt;font color=white&gt;Type&lt;/font&gt;&lt;/td&gt;
      &lt;td bgcolor=#444444 align=center&gt;&lt;font color=white&gt;Sender&lt;/font&gt;&lt;/td&gt;
      &lt;td bgcolor=#444444 align=center&gt;&lt;font color=white&gt;Description&lt;/font&gt;&lt;/td&gt;
      &lt;td bgcolor=#444444 align=center&gt;&lt;font color=white&gt;Credit&lt;/font&gt;&lt;/td&gt;
      &lt;td bgcolor=#444444 align=center&gt;&lt;font color=white&gt;Quantity&lt;/font&gt;&lt;/td&gt;
      &lt;td bgcolor=#444444 align=center&gt;&lt;font color=white&gt;Price&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;?
      $blnto = substr($v_date,3,3);
      switch($blnto)
      {
          case 'JAN': {$blntov = '01'; break;}
          case 'FEB': {$blntov = '02'; break;}
          case 'MAR': {$blntov = '03'; break;}
          case 'APR': {$blntov = '04'; break;}
          case 'MAY': {$blntov = '05'; break;}
          case 'JUN': {$blntov = '06'; break;}
          case 'JUL': {$blntov = '07'; break;}
          case 'AUG': {$blntov = '08'; break;}
          case 'SEP': {$blntov = '09'; break;}
          case 'OCT': {$blntov = '10'; break;}
          case 'NOV': {$blntov = '11'; break;}
          case 'DEC': {$blntov = '12'; break;}
      }
      $tglto = substr($v_date,0,2);
      $thnto = substr($v_date,7,4);
  
  ////////////    HERES THE QUERY
  
      $MyQuery = "
  select date, type, sender, description, credit, quantity, change 
  from harjunadip.REPORTENABLEREGAE 
  WHERE date = '".$thnto."-".$blntov."-".$tglto."' 
  //test with: WHERE date = '2015-10-05'
  order by description
  ";
      //echo $MyQuery;
  
      $curs=ora_open($conn);
      ora_parse($curs,$MyQuery, 0);
      ora_exec($curs);
  
      $i=1;
  
      $tot_qty_p = 0;
      $tot_sal_p = 0;
      $tot_qty_v = 0;
      $tot_sal_v = 0;
  
      while(ora_fetch($curs) == 1) // WHILE THERE IS A ROW
      {
          $bgcolor = "";
          if ($i % 2 != 1) $bgcolor = "bgcolor=#FFFFCC";
  
  ///////// THIS IS THE SUPPOSED TABLE CONTENTS
  
          $content = "
          &lt;tr ".$bgcolor."&gt;
              &lt;td align=\"center\"&gt;".ora_getcolumn($curs,0)."&lt;/td&gt;
              &lt;td align=\"right\"&gt;".ora_getcolumn($curs,1)."&lt;/td&gt;
              &lt;td align=\"right\"&gt;".ora_getcolumn($curs,2)."&lt;/td&gt;
              &lt;td align=\"right\"&gt;".ora_getcolumn($curs,3)."&lt;/td&gt;
              &lt;td align=\"right\"&gt;".number_format(ora_getcolumn($curs,4))."&lt;/td&gt;
              &lt;td align=\"right\"&gt;".number_format(ora_getcolumn($curs,5))."&lt;/td&gt;
              &lt;td align=\"right\"&gt;".number_format(ora_getcolumn($curs,6),2,'.',',')."&lt;/td&gt;
          &lt;/tr&gt;
          ";   
  
          $tot_qty = $tot_qty + ora_getcolumn($curs,5);
          $tot_price = $tot_price + ora_getcolumn($curs,6);;
          echo $content;
          $i++;
      }
      ora_close($curs);
  ?&gt;
          &lt;tr bgcolor="#444444"&gt;
              &lt;td align="right" colspan="5"&gt;&lt;font color="#FFFFFF"&gt;Total :&lt;/font&gt;&lt;/td&gt;
              &lt;td align="right"&gt;&lt;font color="#FFFFFF"&gt;&lt;? echo number_format($tot_qty) ?&gt;&lt;/font&gt;&lt;/td&gt;
              &lt;td align="right"&gt;&lt;font color="#FFFFFF"&gt;&lt;? echo number_format($tot_price,2,'.',',') ?&gt;&lt;/font&gt;&lt;/td&gt;
          &lt;/tr&gt;
  
  &lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Things to consider:</p>
  
  <ol>
  <li><p>The query works, Ive tried the query by replacing '".$thnto."-".$blntov."-".$tglto."' with '2015-10-05' and it gives me the result.</p></li>
  <li><p>The table appears but only the headers (DATE, TYPE, SENDER, etc)</p></li>
  <li><p>The connection to the database also works, so its not a connection problem</p></li>
  <li><p>I'm using adobe.inc.php with oci8 connection if that matters</p></li>
  </ol>
  
  <p>I just cant seem to put the result on the said table. Ive tried echoing some random stuff like this:</p>
  
  <pre><code>select date, type, sender, description, credit, quantity, change 
  from harjunadip.REPORTENABLEREGAE 
  WHERE date = '".$thnto."-".$blntov."-".$tglto."' 
  //test with: WHERE date = '2015-10-05'
  order by description
  ";
      echo 'test1';
  
      $curs=ora_open($conn);
      ora_parse($curs,$MyQuery, 0);
      echo 'test2';
      ora_exec($curs);
  
      echo 'test3';
      $i=1;
  
      $tot_qty_p = 0;
      $tot_sal_p = 0;
      $tot_qty_v = 0;
      $tot_sal_v = 0;
  
      while(ora_fetch($curs) == 1) // WHILE THERE IS A ROW
      echo 'test4';
      {
          $bgcolor = "";
          if ($i % 2 != 1) $bgcolor = "bgcolor=#FFFFCC";
  </code></pre>
  
  <p>But only the 'test1' appeared, the others didnt.</p>
  
  <p>Kindly help please, I'm lost, thanks in advance.</p>