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

📅  最后修改于: 2022-03-11 14:53:55.303000             🧑  作者: 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 {
             ...............   
      }