Unanswered: Form that inserts into table, then emails
if i have an email form with textboxes and textareas, is it possible to have what was entered in those textboxes/areas put into a mysql table before sending out the email? so, if i were using a PHP script, can i run INSERT statements first?
taking a slightly different approach, is it possible to have a PHP file run the INSERT statements, then call a perl/cgi script that handles the email form? (we have a cgi script that was provided to us, but we can't modify it.)
what we essentially want is a copy of the email that is being sent out, with the ability to view that email at a later time.
I am assuming that you are coming from some sort of
html form page and sending the info from a POST method in php
<form action="xxx.php" method="post">
Enter email here
<input type = "text" name="email" />
Enter email address here
<input type = "text" name="emailaddress" />
<input type="submit" value="send" /></form>
$email = $_POST["email"];
$emailaddress = $_POST["emailaddress"];
Now you have the email and all the info in different variables. Now you can do whatever with it, as long as you don't loose the scope of the variable or alter their values.