Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to check user already exists in php

$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 {
             ...............   
      }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #user #exists #php
ADD COMMENT
Topic
Name
5+3 =