I want to check if the username already exists and throw an error message if exist, any tips how can I do it?
I\'ve already tried to search but only found mys
query("select * from user where name='$user_name");
$rowCount=$getUniqueUsername->num_rows;
if($rowCount) {
$insertQuery=$con->query("insert into table_name (field_name) Values('".$values."'));
}
?>