Re: attachment via mail PHP
| From: | Olev Rumm | Date: | Sun, 03 Feb 2002 23:12:51 +0000 |
| Subject: | Re: attachment via mail PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83337@lists.php.net to get a copy of this message | ||
aloooooooooooooooooooooooooo...............
"Olev Rumm" <info@toolmecindustries.com> wrote in message
news:20020202193044.36843.qmail@pb1.pair.com...
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 = buysell@toolmecindustries.com;
$MailSubject = "Equipment Posting";
if (!$MailFromAddress) {
$MailFromAddress = SENDERS@ADDRESS.GOES.HERE;
}
$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>
I dont know if I'm explained correctly so please excuse me.
Can anybody help please.
Olev.