PDA

View Full Version : php mail form



shuga
February 6th, 2003, 11:42 AM
I have a script that I downloaded and modified that looks like this:
but it doesn't work. can anyone help me to make it work?


<?php
if ($state == "")
{
$title="contact";
$header="contact me";
$announce="Send me a message";
}
else
{
$title="PhpMail";
$header="Your Message Sent!";
$announce="Send Another Email...";
if ($mailformat == "Text") mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n" .$ccText.$bccText. "X-Mailer: PHP 4.x");
if ($mailformat == "Html") mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n" .$ccText.$bccText. "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1");
}

?>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>contact me</title>
</head>

<body link="#0000ff" alink="#0000ff" vlink="#0000ff" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
<b><font face="Arial" size="4" color="#000080"><?php echo($announce)?></font><font face="Arial" size="3"><br>
</font></b>
<form method="POST" action="<?php echo($PHP_SELF)?>">
<p><font face="Arial" size="3"><b><font size="1">contact:<br>
</font>
<input type="text" name="toText" size="35" value="me@aaronsleeper.com">
</b></font></p>

<p><font face="Arial" size="3"><b><font size="1">name:<br>
</font>
<input type="text" name="fromText" size="35">
</b></font></p>
<p><font face="Arial" size="3"><b></b></font> <font face="Arial" size="1">Plain
Text</font><font face="Arial" size="2">
<input type="radio" name="mailformat" value="Text">
<font size="1">HTML </font>
<input type="radio" name="mailformat" value="Html"></font>
</p>

<p><font face="Arial" size="3"><b><font size="1">thoughts:<br>
</font></b></font><font face="Arial" size="3"><b>
<textarea rows="11" name="msgText" cols="60"></textarea>
</b></font></p>
<p><font face="Arial" size="3"><b><input type="submit" value="Send" name="send" style="font-family: Arial; font-size: 12pt; font-weight: bold"></b></font></p>
<p>&nbsp;</p>
<input type="hidden" name="state" value="1">
</form>

</body>

</html>


thanks

novatake
February 8th, 2003, 11:38 AM
i have no idea but theres a good contact form on http://www.actionscript.org

shuga
February 8th, 2003, 12:21 PM
thank you very much
what a great site!

novatake
February 8th, 2003, 12:24 PM
yeh actionscript.org is a cool site