user already exists error in php PDO

hy to every one… iam new in php and working with PDO interaction to mysql. iam going to filter user input data using…
echo “username or password already exists…”;



$sql = “INSERT INTO users (Username,Password) VALUES (:username,:password)”;
echo “inserted $count rows.\n”;[/php]
but it show an error… the error is that it simply show the message

[php]username or password already exists[/php]

if the username or password is not exists it show the same message? what can i do? if some one have any idea then put it to my code… if the filter_input() is not used her then what can i use insted of… plz solve it… thank’s in Advance…


filter_input() returns “NULL if the variable_name variable is not set”

You should be specifying strings not variables (remove the $)


Sponsor our Newsletter | Privacy Policy | Terms of Service