close
Question by Danish Hasan: How to direct values from php textboxes in a form to a email account?

I have a web form at designed in php. Can you provide me with a simple code to connect a textbox to an email account.


Best answer:

Answer by Atif Majid
What i understand is you want to send the contents in textbox in an email.
For this you need to submit your form to another php page and then send email. See the following code





Now on mail.php
$ strContent = $ _POST['strContent'];
$ strTo = "to@yahoo.com";
$ strFrom = "from@yahoo.com";
mail($ strTo, "This is subject", $ strContent, "From:".$ strFrom);
?>

If SMTP settings are OK in php.ini, your email will be recieved at $ strTo from $ strFrom.

Give your answer to this question below!
Related sites: Link , Link , Link , Link , Link
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 twkaho 的頭像
    twkaho

    KahoILoveMarket

    twkaho 發表在 痞客邦 留言(1) 人氣()