<?php
session_start();
$db = mysqli_connect("localhost", "root","root");
mysqli_select_db($db,"Имябазы");
function send_request(act, login = null, password = null) {
var var1 = null;
var var2 = null;
if(act == 'auth') {
var1 = login;
var2 = password;
} else if(act == 'send'){
var1 = messageInput.value;
}
} $.post('message.php',{
act: act,
var1: var1,
var2: var2
}).done(function (data){
message_container.innerHTML = data;
if(act == 'send') {
messageInput.value = '';
}
});
Выдает ошибку "Parse error: syntax error, unexpected ',', expecting variable (T_VARIABLE) in C:\OpenServer\domains\connect\send.php on line 5"
я не могу понять, что не так с запятыми?