form w/action

D

danny

Hi,

I using a form which I would like to send to a php script. The form write
some cookies, which when checked, have been written correctly. Now using
<form method="POST" action="scripts/WebContractor.php" id="bizinfo">, I
would like to have the php script mail this info. Instead, I receive a
dialog box warning me that downloading this file can be dangerous.

Any ideas?
TIA


<?php //this is the WebContractor.php file


$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 = "(e-mail address removed)"; // 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

?>
 
K

Kevin Spencer

Apparently, your web server doesn't support PHP.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top