Send email with PHP from html form on submit with the same script

前端 未结 8 1897
情深已故
情深已故 2020-11-22 01:22

I want to send an email with PHP when a user has finished filling in an HTML form and then emailing information from the form. I want to do it from the same script that disp

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 01:29

    You need to add an action into your form like:

        

    Then put your snippet in the top of the document en send the mail. What echo($_SERVER['PHP_SELF']); does is that it sends your information the top of your script so you could use it.

提交回复
热议问题