Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 3D79A4762BD for ; Thu, 16 May 2002 09:58:26 -0400 (EDT) Received: from localhost (p50801E9A.dip.t-dialin.net [80.128.30.154]) by postgresql.org (Postfix) with ESMTP id AF916475E20 for ; Thu, 16 May 2002 09:53:32 -0400 (EDT) Received: from eckhard by localhost with local (Exim 3.35 #1 (Debian)) id 178LhH-00031f-00 for ; Thu, 16 May 2002 15:53:35 +0200 Date: Thu, 16 May 2002 15:53:35 +0200 From: Eckhard Hoeffner To: pgsql-php@postgresql.org Subject: Re: email and postgresql Message-ID: <20020516135335.GA11444@fifoost.org> Mail-Followup-To: pgsql-php@postgresql.org References: <3CD2936400048E65@nplex.globo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <3CD2936400048E65@nplex.globo.com> User-Agent: Mutt/1.3.28i X-Archive-Number: 200205/54 X-Sequence-Number: 1186 * angelo.rigo@globo.com [16 05 02 15:25]: >I would like to ask if it is possible >to have a form to be sent to an emailadress >and store the fields of my form in a table database >at the same time . How do you do that? Well, just do one after the other: // 1. Send the Mail with the mail-function $sent =3D mail($email, $subject, $sende_text, $from); // 2. Store the Mail, if it was sent if(!$sent){echo "Error";} else{ $query =3D "INSERT INTO korrespondenz (kontakt_id, ansprpart_id,=20 betreff, text, art, ihrz, unserz, user_id) VALUES ('$kontakt_id', $ansprpart_id, '$subject',=20 '$body', 'e', '$iz', '$uz', '$user_id')"; // start DB-Connection // execute the query }=09=20=20=20=20 --=20 --//--\\-- Eckhard Hoeffner e-hoeffner@fifoost.org Tal 44=20 D-80331 M=FCnchen