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 DCCDDD1B49B for ; Sat, 17 Apr 2004 19:18:00 -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 42746-10 for ; Sat, 17 Apr 2004 19:18:02 -0300 (ADT) Received: from hotmail.com (bay14-f3.bay14.hotmail.com [64.4.49.3]) by svr1.postgresql.org (Postfix) with ESMTP id 226A4D1D72D for ; Sat, 17 Apr 2004 19:17:59 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 17 Apr 2004 15:18:01 -0700 Received: from 82.47.145.179 by by14fd.bay14.hotmail.msn.com with HTTP; Sat, 17 Apr 2004 22:18:00 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: Re: UPDATE - Changing Password Date: Sat, 17 Apr 2004 22:18:00 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 17 Apr 2004 22:18:01.0244 (UTC) FILETIME=[D87EEDC0:01C424C9] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/24 X-Sequence-Number: 2681 Hi. I think i've sorted the previous problem now, it was a stupid error on my part. But the update is still not working. I'm using the following script: else { $gdidno = addslashes(trim($formgpid)); $newpw = addslashes(trim($formnewpw)); /*$newpw1 = addslashes(trim($formnewpw1));*/ $query = "UPDATE gpinfo SET password='$newpw' WHERE gpid='$gpidno'"; $result = pg_exec($database, $query); if(!$result) { print "There was a problem accessing the database"; exit; } else if(pg_numrows($result)!=1) { print "Update Failed\n"; exit; } else { print "Update Successful\n
"; } } It is just printing Update Failed now. Can u see where i'm going wrong? Visit the following link: www.cyber.brad.ac.uk/~yamkedoo/Tests/chpw.html Username: jjsanderson Password: sanderso Then on the next page, GP ID: GP000001 New Password: hello and ignore retype password for now. As u can see, it is printing update failed. Can u see the prob? Cheers >From: Robby Russell >To: Yasmine Kedoo , pgsql-php@postgresql.org >Subject: Re: [PHP] UPDATE - Changing Password >Date: Sat, 17 Apr 2004 14:57:43 -0700 > >Yasmine Kedoo typed this on 04/17/2004 02:48 PM: >>Hi Robby. >> >>That was recommended to me by someone else :) >> >>When i remove the trim, i still get the same problem. >> >>Any other ideas? >> > >Are you getting the same exact error at the same exact character in your >query? Send me your error and I'll help you more. > >Robby > >-- >Robby Russell, | Sr. Administrator / Lead Programmer >Command Prompt, Inc. | http://www.commandprompt.com >rrussell@commandprompt.com | Telephone: (503) 667.4564 > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly _________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo