unsubscribe

Поиск
Список
Период
Сортировка
От Ash
Тема unsubscribe
Дата
Msg-id BAY101-DAV8D6F908FE7DC57C3A6D1B88D80@phx.gbl
обсуждение исходный текст
Ответ на unable to connect to datadase....  ("manashi chakraborty" <manashi_130582@rediffmail.com>)
Ответы unsubscribe  ("Announce" <truthhurts@insightbb.com>)
Список pgsql-php
 
----- Original Message -----
Sent: Tuesday, March 21, 2006 6:24 AM
Subject: [PHP] unable to connect to datadase....


hi...
    I am doin my project in PHP with PostgreSQL as backend...
        Both r very new to me....
My OS is LINUX 
I am trying to connect to the database bt its not getin connected...
  By using
    "su postgres" command
  i hav created user "root" and database "sample"
    By using
    "psql -U root sample" command
      i hav created table "login" and inserted 3 data's...
  Now through code using PHP i am trying to insert the data but  connection is not getin established.. 
  the code to connect to the datadase is :-
 
<?php
  require_once "DB.php";
  $uname=$_POST['uname'];
  $pass=$_POST['pass'];

$username="root";
$password="";
$hostname="localhost";
$dbname="sample";

$db=new DB;
$dsource=$db->factory("pgsql");

$dcon=pg_connect("dbname=sample user=manashi");

$sql="insert into login values('$uname','$pass')";

$rs=$dsource->pg_query($sql);
?>

  is there anythin wrong with tthe code or sum other problem
    waiting for the reply...

В списке pgsql-php по дате отправления:

Предыдущее
От: Chris
Дата:
Сообщение: Re: unable to connect to datadase....
Следующее
От: Noel Faux
Дата:
Сообщение: [Fwd: Re: unable to connect to datadase....]