Re: email and postgresql

From: Eckhard Hoeffner <e-hoeffner(at)fifoost(dot)org>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: email and postgresql
Date: 2002-05-16 13:53:35
Message-ID: 20020516135335.GA11444@fifoost.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

* angelo(dot)rigo(at)globo(dot)com <angelo(dot)rigo(at)globo(dot)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(at)fifoost(dot)org
Tal 44
D-80331 München

In response to

Browse pgsql-php by date

  From Date Subject
Next Message angelo.rigo 2002-05-16 18:16:34 mailto´s hyperlink solution
Previous Message angelo.rigo 2002-05-16 13:25:24 email and postgresql