I was hoping somebody could help me. I have an estimator on a page that calculates cost. Its in a form and I Post action to pricing.php. On pricing.php I display line by line cost for the user.

What I would like to do is once the user is viewing pricing.php and viewing his estimate. If they like they would like to send me the estimate along with their contact information then they could fill out another form in pricing.php and have emailed to me.

I really dont want to use mysql for this because I really have no need to keep record of every estimate for every user. I only want the serious leads.

6 Years
Discussion Span
Last Post by saadsaidi

How do I email my calculations to myself after they are estimated without using mysql?


If the potential customer is making the decision to follow up on the estimate immediately, then they would click a button, it would open a form where they would provide their contact info and you would then send the email to yourself. In the background, you would pass the estimate numbers from one page to the next as hidden variables or as session variables.


As said before, you need to pass the result set of the estimation using hidden inputs or session variables, I prefer hidden inputs forms since its handling is easier, then pass them to an email script using POST form (this form may contain the contact information).
in case you don't know emailing script below you can find a demo you can use:

extract($_POST);// this will extract the $_POST[] array variables into single variables for example $_POST['name'] will be $name;

$headers  = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; UTF8;" . "\r\n";
$headers .= "From: Your form title <email@yourdomain.com>\n";
$headers .= "X-Priority: 2\n"; //1 = Urgent, 3 = Normal
$headers .= "Return-Path: <return_path@yourdomain.com>\r\n";
$headers .= "cc: cced@yourdomain.com\r\n";
$headers .= "bcc: bcced@yourdomain.com\r\n";
$headers .= "\n";

//format you email in HTML or text (you can use tables, CSS...)
variable name: $variable;\n\r
$result = mail("youremail@yourdomain.com", "Email Subject", $message, $headers);

//here you have 2 choices you can view the $result content or display a custom message
echo $result;

if you need further assistant please don't hesitate contacting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.