By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,824 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,824 IT Pros & Developers. It's quick & easy.

Form results mailed to me in an attachment

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a

"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

P: n/a

"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.