Re: email and postgresql

Поиск
Список
Период
Сортировка
От Eckhard Hoeffner
Тема Re: email and postgresql
Дата
Msg-id 20020516135335.GA11444@fifoost.org
обсуждение исходный текст
Ответ на email and postgresql  (angelo.rigo@globo.com)
Список pgsql-php
* 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

В списке pgsql-php по дате отправления:

Предыдущее
От: angelo.rigo@globo.com
Дата:
Сообщение: email and postgresql
Следующее
От: angelo.rigo@globo.com
Дата:
Сообщение: mailto´s hyperlink solution