X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7DC0DD1DB96 for ; Sat, 17 Apr 2004 18:28:25 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 30570-08 for ; Sat, 17 Apr 2004 18:28:04 -0300 (ADT) Received: from hotmail.com (bay14-f64.bay14.hotmail.com [64.4.49.64]) by svr1.postgresql.org (Postfix) with ESMTP id 0E0D7D1D72D for ; Sat, 17 Apr 2004 18:28:02 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 17 Apr 2004 14:28:04 -0700 Received: from 82.47.145.179 by by14fd.bay14.hotmail.msn.com with HTTP; Sat, 17 Apr 2004 21:28:03 GMT X-Originating-IP: [82.47.145.179] X-Originating-Email: [yazkedoo@hotmail.com] X-Sender: yazkedoo@hotmail.com From: "Yasmine Kedoo" To: pgsql-php@postgresql.org Subject: UPDATE - Changing Password Date: Sat, 17 Apr 2004 21:28:03 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 17 Apr 2004 21:28:04.0035 (UTC) FILETIME=[DE052130:01C424C2] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/21 X-Sequence-Number: 2678 Hi. Does anyone know how to use UPDATE with PHP for changing a password? I've tried the following code: $query = "UPDATE patperinfo SET trim(password)='$newpw' WHERE trim(gpid)='$gpidno'"; $result = pg_exec($database, $query); where new $newpw & $gpidno are the values entered into a form then passed to the script. I get the following error: Warning: PostgreSQL query failed: ERROR: parser: parse error at or near "(" at character 27 in /home/webpages/yamkedoo/Tests/chpw1.php on line 48 where the error is on the line: $result = pg_exec($database, $query); Thanx :-) _________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo