From: Eckhard Hoeffner <e-hoeffner@fifoost.org>
To: pgsql-php@postgresql.org
Subject: Re: email and postgresql
Date: Thu, 16 May 2002 15:53:35 +0200
Message-ID: <20020516135335.GA11444@fifoost.org> (raw)
In-Reply-To: <3CD2936400048E65@nplex.globo.com>
References: <3CD2936400048E65@nplex.globo.com>
* angelo.rigo@globo.com <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 = mail($email, $subject, $sende_text, $from);
// 2. Store the Mail, if it was sent
if(!$sent){echo "Error";}
else{
$query = "INSERT INTO korrespondenz (kontakt_id, ansprpart_id,
betreff, text, art, ihrz, unserz, user_id)
VALUES ('$kontakt_id', $ansprpart_id, '$subject',
'$body', 'e', '$iz', '$uz', '$user_id')";
// start DB-Connection
// execute the query
}
--
--//--\\--
Eckhard Hoeffner
e-hoeffner@fifoost.org
Tal 44
D-80331 München
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: e-hoeffner@fifoost.org
Subject: Re: email and postgresql
In-Reply-To: <20020516135335.GA11444@fifoost.org>
References: <3CD2936400048E65@nplex.globo.com> <20020516135335.GA11444@fifoost.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox