Page 1 of 1

Formular to mail

Posted: Sat Dec 16, 2006 9:41 am
by degn
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I have made this simpel questionary (input.php)

[syntax="html"]<form method=post action="output.php">
Name: <input type=text name=name size=15>
Age: <input type=text name=age size=1> år
Height: <input type=text name=hight size=1> cm
Weight: <input type=text name=weight size=1> kg
<input type=submit value="Send"></form>

Where the Output-file, is:[/syntax]

Code: Select all

<?
echo "Name: "; echo $_POST["name"]; echo "<BR>";
echo "Age: "; echo $_POST["age"]; echo "<BR>";
echo "Height: "; echo $_POST["height"]; echo "<BR>";
echo "Weight: "; echo $_POST["weight"]; echo "<BR>";
?>
When the user has completed the questionary and press 'Send', the output-file appears with the proper informations.

I wish to send this final output-page to my email-adress (degn@zone7.dk) as a simpel text-file but how?

Regards Jørgen


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Sat Dec 16, 2006 10:02 am
by volka
You might be interested in Swiftmailer. It got its own forum here on the board, viewforum.php?f=52
Swiftmailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Simpliticy

Posted: Sat Dec 16, 2006 10:15 am
by degn
Thanks, but I prefer to keep the solution as simpel as possible.
/Jørgen

Posted: Sat Dec 16, 2006 10:16 am
by John Cartwright
then give mail() a read, although you may find it to be harder to implement than Swift :wink:

Posted: Sat Dec 16, 2006 10:59 am
by volka
Jcart wrote:then give mail() a read, although you may find it to be harder to implement than Swift :wink:
/signed
esp. when something goes wrong mail() (and the script around) can be a pain in the where-the-sun-will-never-shine.