Hey guys,
Im trying to set up username and password database and im trying to prevent people from signing up with the same username twice by querying the database "ComputerClub" and checking to see if the entered username ($Name1) is already in the database in the column "Name".
This is my script currently, but no matter what i enter, i keep getting an invalid query with the mysql error of "No database selected"...can anyone help me and tell me what im doing wrong? Thanks
if($Password!=$Password2){
echo 'Please make sure your passwords match <br>';
echo '<a href=member.php>Go Back</a href>';
}else{
mysqli_connect('database','quinntk','password', 'DBquinntk') OR die ('Could not connect to MySQL: ' . mysqli_connect_error());
mysql_select_db("ComputerClub");
$Name1 = $_POST['Name'];
$result=mysql_query("SELECT Name FROM ComputerClub WHERE Name='$Name1'");
if(!$result){
die('Invalid Query'. mysql_error());
}