başlıkta da okudugunuz gibi username ve mailin tekrarlanmasını engellemek istiyorum yardımcı olursanız sevinirim

<?php

session_start();

if( isset($_SESSION['user_id']) ){
    header("Location: /");
}

require 'database.php';

$message = '';

if(!empty($_POST['username']) && !empty($_POST['email']) && !empty($_POST['password'])):
    
    // Enter the new user in the database
    $sql = "INSERT INTO users (username,email,password,status) VALUES (:username, :email, :password, 1)";
    $stmt = $conn->prepare($sql);
    $stmt->bindParam(':username', $_POST['username']);
    $stmt->bindParam(':email', $_POST['email']);
    $stmt->bindParam(':password', password_hash($_POST['password'], PASSWORD_BCRYPT));
    if( $stmt->execute() ):    
        $message = 'Kayıt Başarılı!';
    else:
        $message = 'Kayıt Başarısız Lütfen Bilgilerinizi Kontrol Ediniz!';
    endif;

endif;

?>