You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(($_SESSION["id"] == $u1 || $_SESSION["id"] == $u2) && mysqli_num_rows(mysqli_query($link,"SELECT id FROM users where id = ".$u1." OR id = ".$u2)) == 2){
$dbspec = "_".min($u1,$u2)."_".max($u1,$u2);
}
}
$qry = 'INSERT INTO messages'.$dbspec.'(username,message) VALUES ("'.$_SESSION["username"].'","'.trim($_POST["msg"]).'")';
// echo $qry;
// no u
$result = mysqli_query($link,$qry);
// $result = mysqli_query($link,'INSERT INTO messages(username,message) VALUES ('.$_SESSION["username"].'$_POST["msg"])');