468,296 Members | 1,372 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,296 developers. It's quick & easy.

Form results mailed to me in an attachment

I have a form which customers can fill in whenever they have got products
which they want to be anodised. Everything works fine and in addition to the
email I get out of my formmail.php, I would also like to get an attachment
with that email which also contains the results. I want to use that file for
further processing the customers orders in my database. So the file should
be delimited by tabs of comma's.

Does anyone know if there is an function which can be added in the
formmail.php so this will be possible?
I'm using formmail.php form Andrew Riley (with Don's update)

WiseGuy
Jul 17 '05 #1
3 1631
WiseGuy wrote:
I have a form which customers can fill in whenever they have got products
which they want to be anodised. Everything works fine and in addition to
the email I get out of my formmail.php, I would also like to get an
attachment with that email which also contains the results. I want to use
that file for further processing the customers orders in my database. So
the file should be delimited by tabs of comma's.

Does anyone know if there is an function which can be added in the
formmail.php so this will be possible?
I'm using formmail.php form Andrew Riley (with Don's update)

WiseGuy

Yes, an attachment can be added to the email using headers. Just search
over at http://php.net and http://google.com
There are already dozens of tutorials/scripts for doing this.
Jul 17 '05 #2

"Brendan Donahue" <wi****@wizardsofwebsites.com> schreef in bericht
news:uI********************@comcast.com...
WiseGuy wrote:
Yes, an attachment can be added to the email using headers. Just search
over at http://php.net and http://google.com
There are already dozens of tutorials/scripts for doing this.


Let's try a search on headers then. But maybe someone have a suggestion
on a specific script?
--
Posted by news://news.nb.nu
Jul 17 '05 #3

"Brendan Donahue" <wi****@wizardsofwebsites.com> schreef in bericht
news:uI********************@comcast.com...
Yes, an attachment can be added to the email using headers. Just search
over at http://php.net and http://google.com
There are already dozens of tutorials/scripts for doing this.


I've tried searching for scripts and I think that I will have to take it one
step at a time. First I need to know how to get my form results in a text
file.
For that I found the following:

<?php
$file = @fopen("/order.txt", 'a+');
if ($file == false) {
// could not open the file, so handle the error
}
else {
$buffer = "what you have to write\n";
$written = fwrite($file, $buffer);
fclose($file);

// check everything is ok
if ($written != strlen($buffer)) {
// oops, there was a problem
}
}

?>

But this doesn't write anything to my file called "order.txt". Although I
set
the permissions on that file to 777. Does someone no what's wrong?
--
Posted by news://news.nb.nu
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jim Tome | last post: by
reply views Thread by Toby Inkster | last post: by
11 posts views Thread by ChrisM | last post: by
reply views Thread by canistel | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.