是否可以在通过PHP检查数据库的输入更改上调用JavaScript或jQuery函数?

As stated, I'd like to do live validation on a form. Specifically, I'd like to add a function like this:

<input onchange="validate();"></input>

function validate() {
    // PHP here to check input value against table value on server
}

Is this possible? I can't find reference to this kind of thing anywhere. I'd like to be able to check values against an SQL table without page reload

You have a few options. First, you can make an AJAX call. This is normally what can be done.

Second, depending on the information in the SQL table as well as the size of the SQL table, you can load all of it on page load and store it into a JSON blob. From there, your validate() function can parse the JSON.

Usually the option to take is the AJAX call option.

Yes. Check out jQuery's .on('change') and AJAX implementation. Simply have it post to a PHP script dedicated to accepting only the data you want to have validated, and then echo a JSON string containing true or false.

You cannot run PHP directly from JS, as none of the PHP code is ever seen by the client. It's all executed on the server, before the output of the PHP code is sent to the client.