📅  最后修改于: 2022-03-11 14:54:53.500000             🧑  作者: Mango
$sql = "SELECT username FROM table_name WHERE username='{$username}'";
$result = mysqli_query($con,$sql) or die("Query unsuccessful") ;
if (mysqli_num_rows($result) > 0) {
echo "Username is already exist";
} else {
...............
}