I have created a function to insert information into two different tables, but it is displaying an error:
You have an error in your SQL syntax; ('mary', 2147483647, 'a' at line 2)
My role is:
function newUser($connect, $name, $reg, $address, $phone, $email, $pass){
$query = "insert into user(email, password) values('{$email}','{$pass}');
insert into client(name, reg, address, phone) values('{$name}','{$reg}','{$address}','{$phone}')";
return mysqli_query($connect, $query);
}
When I test the direct query in the bank, it works. :