- if ($founduser == 0) {
echo
"$name is available";}
- if ($founduser != 0) {
echo
"$name already exists in the database. Please select another name";}
So what's happening is, when $founduser == 0, the update script preforms just fine and the database is populated correctly, but then the entire script will then re-run itself and find the name that was just entered, resulting in $founduser != 0.