Thank you all for your help. But while waiting for a reply, I was messing around with it, trying to see if I could fix it myself. I still have the same trouble, and here's my code now:
PHP Code:
$result = mysql_query("SELECT `user` FROM information WHERE `user` = '". $user ."'");
if(!$result){
$result = mysql_query("INSERT INTO `information` (`user`, `pass`) VALUES('". $user ."', '". $pass ."')");
if(!$result){
echo("Unable to add user: ". $user ." to database. Please try again.");
exit;
} else{
echo("Thank you for registering <b>". $user ."</b>! Please enjoy your stay here.");
}
} else{
echo("The username <b>". $user ."</b> was already found in the database. Please go back and fix this problem.");
}
Anyone have any idea?