Ciao a tutti volevo sapere come potevo fare per far si che durante la registrazione se qualcuno inserisce un username già esistente gli stampa un messaggio di errore?
questo è il codice in php
Codice PHP:
<?php if(isset($_POST["Username"]))
{ $query = mysql_query("INSERT INTO utenti (ID,Username,Password,Nome,Cognome,Email)
VALUES (NULL ,'{$_POST['Username']}', '{$_POST['Password']}', '{$_POST['Nome']}', '{$_POST['Cognome']}','{$_POST['Email']}')", $idConnessione); }
?>