Contact form sends mail with empty message field

后端 未结 2 966
孤独总比滥情好
孤独总比滥情好 2021-01-29 04:54

When i send an email with my contact form the textarea value does not send and the \"message:\" field is always empty in the email.

Declaring the input variables manuall

2条回答
  •  不思量自难忘°
    2021-01-29 05:44

    I found the issue on your code:

    the Values from textarea never made it the Server side, because you are doing this in your PHP:

    $message = $_POST['text'];
    

    You should do this in order to get the value from textarea:

    $message = $_POST['message'];
    

    This will solve your issue :). Hope it helps.

提交回复
热议问题