Jump to content

[SOLVED] Error with function


june_c21

Recommended Posts

hi, i not sure what's wrong with this function. can someone help me. thanks

 

function db_connect($name,$host,$login,$password) {
  $conn_string = "dbname=".pg.";
    ($host?" host=".localhost"").
    ($login?" user=".root"").
    ($password?" password=""");
  $conn = new pg_connection($conn_string);
  if ($conn->handle)
    register_shutdown_function(array($conn,"close"));
  else
    $conn=false;
  return $conn;
}

Link to comment
https://forums.phpfreaks.com/topic/104305-solved-error-with-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.