Hey!
okay…here’s an existing form handler that I’m using. Currently, this file emails me the details of the form submission.
I need it to adjust it to:
- attached this to the database, without compromising the email functionality of the handler.
- upload the info from my form to the database.
- Add a variable to the confirmation email that includes a confirmation ID that are in sequential order (1001 on the first form submission, 1002 for the second submission, etc).
Can someone help me make the necessary adjustments to accomplish this? I’ve poked around on the internet for help, but haven’t found something includes info about how to get a confirmation # to do what I need it to do. (I have created a database, but have not created any tables in it yet).
[php]<?php
$to = ‘myemail’;
$subject = "New Request from " . strip_tags($_POST[‘name’]) . “” . strip_tags($_POST[‘ConfirmationID’]) . “”;
$url = ‘https://www.mydomain.html’;
$headers .= “From: myemail\r\n”;
$headers .= “CC: myemail\r\n”;
$headers .= “MIME-Version: 1.0\r\n”;
$headers .= “Content-Type: text/html; charset=ISO-8859-1\r\n”;
$message .= ‘’;
$message .= "
words here…
more words…
Full Name: " . strip_tags($_POST[‘name’]) . "
Phone Number: " . strip_tags($_POST[‘phone’]) . "
Email: " . strip_tags($_POST[‘mail’]) . "
Address: " . strip_tags($_POST[‘address’]) . "
City, State ZIP: " . strip_tags($_POST[‘city’]) . “
mail($to, $subject, $message, $headers);
$message = “”;
$headers = “”;
$to = $_POST[‘Email’];
$subject = ‘Confirmation’;
$headers .= “From: myemail\r\n”;
$headers .= “MIME-Version: 1.0\r\n”;
$headers .= “Content-Type: text/html; charset=ISO-8859-1\r\n”;
$message .= ‘’;
$message .="another message here…you’re confirmation ID is " . strip_tags($_POST[‘ConfirmationID’]) . “”;
mail($to, $subject, $message, $headers);
echo ‘’;
?>
[/php]
Thanks!