Page 1 of 1

E-mailing submitted information in a form to the webmaster

Posted: Tue Jul 29, 2003 3:47 am
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 ..

Posted: Tue Jul 29, 2003 6:56 am
by twigletmac
Have you had a look in the PHP manual for the mail() function?

Mac

Posted: Tue Jul 29, 2003 1:41 pm
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