📌  相关文章
📜  如何检查用户名是否已存在于php代码示例中

📅  最后修改于: 2022-03-11 14:54:53.500000             🧑  作者: Mango

代码示例2
$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 {
             ...............   
      }