$sql = "INSERT INTO " . "user" . " VALUES('', 'none', 'user', '" . addslashes($_POST['username']) . "', '" . md5($_POST['password']) . "', '" . addslashes($_POST['user_clan']) . "', '" . addslashes($_POST['user_web']) . "', '" . addslashes($_POST['msnm']) . "', '" . addslashes($_POST['yahoo']) . "', '" . addslashes($_POST['icq']) . "', '" . addslashes($_POST['user_email']) . "', '" . addslashes($_POST['user_info']) . "', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none')";
if(!($result = mysql_query($sql))) {
die(mysql_error());
} else {
How do I create an error when the user name has been taken?
Thanks