php – when inserting a condition, I get 500 error

I send the data of modal to the file with the php as following:

insert_regist () function
{

var dataajax = {
& # 39; Type: $ ("# Type"). Val (),
& # 39; Priority: $ ("# Priority"). Val (),
& # 39; To: $ ("# To"). Val (),
& # 39; Subject: $ ("# Subject"). Val (),
& # 39; Content: $ ("# Content"). Val ()
};
$ .ajax ({
url: & # 39; ./ connectionRAD & # 39;
type: "POST",
cache: false,
data: dataajax,
error: function () {

}
success: function (result)
{
console.log (result);
}
});
}   

In the file php I have this:

$ Type = $ _POST["Tipo"];
Priority $ = $ _POST["Prioridade"];
$ To = $ _POST["Para"];
$ Subject = $ _POST["Assunto"];
$ Content = $ _POST["Conteudo"];

if ($ _ POST["Para"] == AAD & # 39; || $ _POST["Para"] ==> ENF & # 39;) {

SELECT & # 39; $ Type, $ Priority, Collaborator, $ Subject, $ Content, & # 39; date. ($ Priority, Type, Priority, To, Subject, Content, Received) $ query = "INSERT INTO centrodb.Alerts" Ymd H: i: s). & # 39; & # 39; OF testCol WHERE Group = & # 39; AAD & # 39; OR Group = & # 39; ENF & # 39; ";
$ result = mysqli_query ($ conn, $ query);
} else {
VALUES ($ Type, $ Priority, $ To, $ Subject, $ Content & # 39; ;, & # 39; $ Content & # 39;; & # 39;; .date (& quot; Ymd H: i: s & # 39;) & quot; & # 39;) & quot; ";
$ result = mysqli_query ($ conn, $ query)
}    

Whenever I go in I get the error 500, I can not see where the error is.

But if in the file php put it like this:

VALUES ($ Type, $ Priority, $ To, $ Subject, $ Content & # 39; ;, & # 39; $ Content & # 39 ;, & dquo; ".date (& dquo; Ymd H: i: s & dquo;) & quot;" & # 39;) ";  

Already inserts
$ result = mysqli_query ($ conn, $ query)