X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7EF54D1BB3D for ; Thu, 21 Aug 2003 10:43:30 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 14091-10 for ; Thu, 21 Aug 2003 10:43:23 -0300 (ADT) Received: from web14811.mail.yahoo.com (web14811.mail.yahoo.com [66.163.172.95]) by svr1.postgresql.org (Postfix) with SMTP id 34C86D1BB1E for ; Thu, 21 Aug 2003 10:43:19 -0300 (ADT) Message-ID: <20030821134321.2549.qmail@web14811.mail.yahoo.com> Received: from [200.219.69.252] by web14811.mail.yahoo.com via HTTP; Thu, 21 Aug 2003 10:43:21 ART Date: Thu, 21 Aug 2003 10:43:21 -0300 (ART) From: =?iso-8859-1?q?=C2ngelo=20Marcos=20Rigo?= Subject: Re: Update problem To: Gerd Terlutter Cc: "scott.marlowe" , pgsql-php@postgresql.org In-Reply-To: <3F44BAE5.1080605@MplusB.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/92 X-Sequence-Number: 2269 Thank´s the pg_escape_string works, i still turn the wrap atributte from the textarea to virtual But at the update part of the scripts doing a print query return me: UPDATE revista SET titulo='ASILO PADRE CACIQUE ', resumo='Sociedade Humanitária Padre Cacique fundada em 12 de maio de 1982, entidade particular com fins beneficentes.', texto='' WHERE id='16'Estes valores foram atualizados: The texto (or text) field still is passed by empty here is the update_2.php (there is update.php and update_1.php) "); print_r($texto); print("

"); include 'db.php'; $query = "UPDATE table SET titulo='$titulo', resumo='$resumo', texto='$texto' WHERE id='$id'"; print $query; $result = pg_query($db, $query); if (!$result) {printf ("ERROR"); exit;} print ("Estes valores foram atualizados:

- $id
- $titulo
- $resumo
- $texto
"); pg_close($db); ?> --- Gerd Terlutter escreveu: > pg_scape_string() ? > better > pg_escape_string() ? > Ângelo Marcos Rigo wrote: > > Hi !! > > > > I do this: > > > > $titulo = pg_scape_string($_POST['titulo']); > > $resumo = pg_scape_string($_POST['resumo']); > > $texto = pg_scape_string($_POST['texto']); > > > > but it do not work is it correct? > >>>do a clean up with: > >>>$texto = pg_scape_string($_POST['texto']); > >>Not sure, I'm just guessing. Anytime you want to > >>put text into the > >>database you need to pg_escape_string($field) each > > > -- > -------------------------------------------------------- > # Gerd Terlutter | Mueller+Blanck Software > GmbH # > # gerd@MplusB.de | Gutenbergring 38 > # > # gerd.terlutter@web.de | D-22848 Noderstedt > # > # tel:0171/6992579 | tel:+49 40 500 171-1 > # > # Buero:040/500171-17 | fax:+49 40 500 171-71 > # > -------------------------------------------------------- > > ===== Ângelo Marcos Rigo AMR Informática (51) 3348 0870 Rua Pe. Alois Kades 400/210 Porto Alegre /RS/Brasil http://amr.freezope.org angelo_rigo@yahoo.com.br _______________________________________________________________________ Desafio AntiZona - Um emocionante desafio de perguntas e respostas que te dá um Renault Clio, kits de eletrônicos, computadores, notebooks e mochilas. Cadastre-se, participe e concorra! www.cade.com.br/antizona