Benji
03-27-2004, 04:56 PM
Okay, I created a PHP file that should take the results of a form, and mail them. But, however, all it does is when I hit the submit button, it opens the PHP file in that window, but it shows the code. In the form I made the form tag like this:
<form method="POST" action="rfq.php">
That way, it is showing that it should use the code in rfq.php. Here is rfq.php:
<?
// -------- EMail Form-----------
// By: Ben Gordon----------------
// -- Let's see if it works------
// Make message
$msg = "Name:\t$name\n";
$msg .= "E-Mail:\t$email\n";
$msg .= "Comments:\t$comments\n\n";
// Build mail message and send it to target recipient.
$recipient = "psoportal@knology.net";
$subject = "RFQ Form";
$mailheaders = "From: RFQ Form\n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail("$recipient", "$subject", $msg, $mailheaders);
// Print confirmation to screen.
echo "
<H1 align=center>Thank You, <?php print $name ?></h1>
<p align=center>Your message has been sent.</p>
";
?>
But all it shows in the browser, is the code I just posted. If anyone could help, it would be greatly appreciated.
Thanks,
Ben Gordon
<form method="POST" action="rfq.php">
That way, it is showing that it should use the code in rfq.php. Here is rfq.php:
<?
// -------- EMail Form-----------
// By: Ben Gordon----------------
// -- Let's see if it works------
// Make message
$msg = "Name:\t$name\n";
$msg .= "E-Mail:\t$email\n";
$msg .= "Comments:\t$comments\n\n";
// Build mail message and send it to target recipient.
$recipient = "psoportal@knology.net";
$subject = "RFQ Form";
$mailheaders = "From: RFQ Form\n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail("$recipient", "$subject", $msg, $mailheaders);
// Print confirmation to screen.
echo "
<H1 align=center>Thank You, <?php print $name ?></h1>
<p align=center>Your message has been sent.</p>
";
?>
But all it shows in the browser, is the code I just posted. If anyone could help, it would be greatly appreciated.
Thanks,
Ben Gordon
