Hello
I was looking a way to fill a forms on line and send them over via the server. 

Found a good(in my mind) and simple php mail skript
from http://open.appideas.com/phpMailForm/source.php

I managed to get it working. In my form there is a upload the the file section.
like this:
<FORM name="your_file" value="2000000"><input name="attachment" type="file">
with max value of 2megs.
It's not working. Pecause Im absolutely new in this I dont have a any idea how to 
implement attachment part into this script.Original script is here:

<?
$MailToAddress = "[EMAIL PROTECTED]";
$MailSubject = "Equipment Posting";
    if (!$MailFromAddress) {
    $MailFromAddress = "[EMAIL PROTECTED]";
    }
$Header = "";
$Footer = "";
?>
<html>
<body bgcolor="#FFFFFF">
<font face="Arial"><center>
The following information has been delivered:
</center>

<?
    if (!is_array($HTTP_POST_VARS))
    return;
reset($HTTP_POST_VARS);
    while(list($key, $val) = each($HTTP_POST_VARS)) {
    $GLOBALS[$key] = $val;
    $val=stripslashes($val);
    echo  "<b>$key</b> = $val<br>";
    $Message .= "$key = $val\n";
    }

    if ($Header) {
    $Message = $Header."\n\n".$Message;
    }

    if ($Footer) {
    $Message .= "\n\n".$Footer;
    }

mail( "$MailToAddress", "$MailSubject", "$Message", "From: $MailFromAddress");
?>
<br><br>
<b>Thank You!</b>
<br><br>
<a href="<? echo  "$HTTP_REFERER"; ?>">Return To The Mail Form</a><br><br>
<a href="/">Home Page</a><br><br> 

Can anybody help please.I dont know if I'm explained correctly so please excuse me.
Olev.  

Reply via email to