Formular to mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
degn
Forum Newbie
Posts: 2
Joined: Sat Dec 16, 2006 9:30 am

Formular to mail

Post 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]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
degn
Forum Newbie
Posts: 2
Joined: Sat Dec 16, 2006 9:30 am

Simpliticy

Post by degn »

Thanks, but I prefer to keep the solution as simpel as possible.
/Jørgen
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

then give mail() a read, although you may find it to be harder to implement than Swift :wink:
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
Post Reply