X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3DEBC9DD447 for ; Tue, 21 Mar 2006 06:09:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24400-01 for ; Tue, 21 Mar 2006 06:09:30 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 1EA0B9DD54C for ; Tue, 21 Mar 2006 06:09:26 -0400 (AST) Received: from hotmail.com (bay101-dav8.bay101.hotmail.com [64.4.56.80]) by svr4.postgresql.org (Postfix) with ESMTP id BF1355AF187 for ; Tue, 21 Mar 2006 10:09:28 +0000 (GMT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 21 Mar 2006 02:09:26 -0800 Message-ID: Received: from 199.229.190.200 by BAY101-DAV8.phx.gbl with DAV; Tue, 21 Mar 2006 10:09:25 +0000 X-Originating-IP: [199.229.190.200] X-Originating-Email: [ash_whiting@hotmail.com] X-Sender: ash_whiting@hotmail.com From: "Ash" To: References: <20060321062429.7753.qmail@webmail35.rediffmail.com> Subject: unsubscribe Date: Tue, 21 Mar 2006 10:04:36 -0000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00A8_01C64CCE.DC2516F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-OriginalArrivalTime: 21 Mar 2006 10:09:26.0438 (UTC) FILETIME=[88D72460:01C64CCF] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.934 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, HTML_IMAGE_ONLY_28=1.014, HTML_MESSAGE=0.001, MSGID_FROM_MTA_HEADER=0] X-Spam-Score: 2.934 X-Spam-Level: ** X-Archive-Number: 200603/10 X-Sequence-Number: 3460 This is a multi-part message in MIME format. ------=_NextPart_000_00A8_01C64CCE.DC2516F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ----- Original Message -----=20 From: manashi chakraborty=20 To: pgsql-php@postgresql.org=20 Sent: Tuesday, March 21, 2006 6:24 AM Subject: [PHP] unable to connect to datadase.... =20 hi... I am doin my project in PHP with PostgreSQL as backend... Both r very new to me.... My OS is LINUX =20 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.. =20 the code to connect to the datadase is :- =20 factory("pgsql"); $dcon=3Dpg_connect("dbname=3Dsample user=3Dmanashi"); $sql=3D"insert into login values('$uname','$pass')"; $rs=3D$dsource->pg_query($sql); ?> is there anythin wrong with tthe code or sum other problem waiting for the reply...=20 ------=_NextPart_000_00A8_01C64CCE.DC2516F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
----- Original Message -----
From:=20 manashi chakraborty =
Sent: Tuesday, March 21, 2006 = 6:24=20 AM
Subject: [PHP] unable to = connect to=20 datadase....


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

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

$db=3Dnew=20 = DB;
$dsource=3D$db->factory("pgsql");

$dcon=3Dpg_connect("db= name=3Dsample=20 user=3Dmanashi");

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

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

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



------=_NextPart_000_00A8_01C64CCE.DC2516F0--