Hi,
I have a form which needs posting the php script below. (I sent my vars to a
cookie, which I have read correctly). This is the form command used in
hoping to process my information.
<form method="POST" action="scripts/WebContractor.php" name="bizinfo"
id="bizinfo">
Since most of this is new to me, please let me ramble in my thought process.
1. post the vars to a cookie
2. post the form pointing to the php script
3. read the vars in the php script
4. send the info from within the script
When I submit my form, I receive a dialog box stating the downloading this
file can be dangerous. What happens is the php script is downloaded to my
desktop - not executed.
Here is the php script named WebContractor.php:
<?php
$Bizname = $HTTP_GET_VARS['BizName'];
$BizAddress = $HTTP_GET_VARS['BizAddress1'];
$BizAddress2 = $HTTP_GET_VARS['BizAddress2'];
$BizCity = $HTTP_GET_VARS['BizCity'];
$BizZip = $HTTP_GET_VARS['BizZip'];
$BizWorkPhone = $HTTP_GET_VARS['BizWorkPhone'];
$BizHomePhone = $HTTP_GET_VARS['BizHomePhone'];
$BizCellPhone = $HTTP_GET_VARS['BizCellPhone'];
$BizFax = $HTTP_GET_VARS['BizFax'];
$BizEmail = $HTTP_GET_VARS['BizEmail'];
$rec_email = "ju**********@thewrongplace.com"; // send this email to myself
$subject = "Contractor Liability Form (Web)";
// make it pretty
$msgInfo = "<html><head></head><body>";
$msgInfo = "<font face=\"Microsoft Sans Serif\" size=\"2\">";
$msgInfo .= "<hr width=\"100%\" size=\"1\" ><br>";
$msgInfo .= "<b>Bizname:</b> $Bizname<br>";
$msgInfo .= "<b>Address:</b> $BizAddress<br>";
$msgInfo .= "<b>Address2:</b> $BizAddress2<br>";
$msgInfo .= "<b>City:</b> $BizCity<br>";
$msgInfo .= "<b>Zip:</b> $BizZip<br>";
$msgInfo .= "<b>WorkPhone:</b> $BizWorkPhone<br>";
$msgInfo .= "<b>HomePhone:</b> $BizHomePhone<br>";
$msgInfo .= "<b>CellPhone:</b> $BizCellPhone<br>";
$msgInfo .= "<b>Fax:</b> $BizFax<br>";
$msgInfo .= "<b>Email:</b> $BizEmail<br>";
$msgInfo .= "</font></body></html>";
$header_info = "MIME-Version: 1.0\r\n";
$header_info .= "Content-type: text/html; charset=iso-8859-1\r\n";
$header_info .= "From: ".$name." <".$email.">";
mail($rec_email, $subject, $msgInfo, $header_info); // mail it
?>
TIA
danny