E-mailing submitted information in a form to the webmaster

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
TitaniuM
Forum Newbie
Posts: 1
Joined: Tue Jul 29, 2003 3:47 am

E-mailing submitted information in a form to the webmaster

Post by TitaniuM »

hey guyz .. i m learning PHP so plz i m sorry for such nooby questions ..
well i wanted to know , what code can i put in my .php file that will send all the information stored in the variables to my email ..

i mean like lets say i have form

HTML FORM ----------------------------
FIRST NAME: John
LAST NAME: Smith

PHP FILE--------------------------------
$fname
$lname

when the user submits the form after putting his first and last name .. the names get stored in the variables .. now if i want these 2 variables to be sent to an email address (me) .. what code do i need .. plz help me ..
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you had a look in the PHP manual for the mail() function?

Mac
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

we don't mind newbish questions. that's what this forum is for. but it doesn't make people want to help you when the question is asking for code when there's a built in function for that.

http://www.php.net

you can search for functions there. if you have trouble with using the mail function i'm sure i'm not the only one who'd be happy to help if you show us how you're calling it with your code in the php tags so it's easier to look at
Post Reply