title: PHP: getting data from Oracle 10g database
body: <p>I am using wamp server 2.0 working with PHP and my database is Oracle 10g.</p>
  
  <p>I am new to php and I am try to fetch data from database.</p>
  
  <p>There are two columns in my table. I want show 1 column data.
  After executing I get only blank page, without data from database (and yes, there is data in my database).</p>
  
  <p>How can I fix this?</p>
  
  <pre><code>&lt;?php
  $c = oci_connect("system", "123", "localhost/XE");
  if (!$c) {
    echo "Unable to connect: " . var_dump( oci_error() );
    die();
  }
  
  $s = oci_parse($c, "select col2 from tab1");
  oci_execute($s, OCI_DEFAULT);
  while ($row =oci_fetch($s)) {
  echo $row['name']."&lt;br&gt;";
  }
  
  // Commit to save changes...
  oci_commit($c);
  
  // Logoff from Oracle...
  oci_free_statement($s);
  oci_close($c);
  ?&gt;
  </code></pre>