为什么这个ajax调用只发送q和电子邮件?

I have written the following ajax call but only the q and email parameters are being sent, I've tried replacing message as I thought that it may be a key word but that still didn't work. I'm lost for ideas now.

$.ajax({
    type: 'POST',
    url: '/ajax/functions.php',
    data: {
        q: 'need_help',
        email: $('input[name=email]').val(),
        message: $('input[name=message]').val()
    }
}).done(function(response) {
    console.log(response);
});

Any help is much appreciated.

Form Code:

<div class='form-group col-sm-offset-3 col-sm-6'>
    <input class='form-control' type='email' name='email' placeholder='Your email'>
</div>

<div class='form-group col-sm-offset-3 col-sm-6'>
    <textarea class='form-control' name='message' placeholder='What is your problem?'></textarea>
</div>

<div class='form-group col-sm-offset-3 col-sm-6'>
    <input id='button_submit' type='submit' class='btn btn-primary form-control' value='Send' name='need_help' data-loading-text='Sending...'>
</div>

Before you say it's not in a form the ajax call is sent out in an onClick on the submit button, also I only have a blank file for the ajax at the moment but I can see the error in the developer network tab.

You need to change:

message: $('input[name=message]').val()

to

message: $('textarea[name="message"]').val()

Message is a textarea, not an input, try changing that out and seeing if it shows up now.

message: $('textarea[name=message]').val()

You have the wrong selector:

    message: $('input[name=message]').val()
                ^^^^^---input field

<textarea class='form-control' name='message' placeholder='What is your problem?'>
 ^^^^^^^^---but it's actually a textarea

Try $('textarea[name=message]') instead.