* 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