title: PHP Connection to DB2
body: <p>I am trying to connect a database from php script.</p>
  
  <pre><code>&lt;?php
  $database = '****';
  $user = '*****';
  $password = '******';
  $hostname = '********';
  $port = 50000;
  
  $conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
    "HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
  $conn = db2_connect($conn_string, '', '');
  
  if ($conn) {
      echo "Connection succeeded.";
      db2_close($conn);
  }
  else {
      echo "Connection failed.";
  }
  ?&gt;
  </code></pre>
  
  <p>I am geting the following error. </p>
  
  <blockquote>
    <p>Call to undefined function db2_connect() in /home/s1.php on line 10</p>
  </blockquote>
  
  <p>Can somebody Help me out how to resolve the following.</p>