This code is giving error.
Warning: mysqli_connect (): (42000/1044): Access denied for user 'u469236901_roota'@'10.2.1.41' to database 'u469236901_sysU' in /home/u469236901/public_html/RegisterUnity.php on line 7
Warning: mysqli_error () expects parameter 1 to be mysqli, boolean given in /home/u469236901/public_html/RegisterUnity.php on line 7 Error
I want to make a register and login system in unity.
<?php
$email = $_POST['email'];
$nome = $_POST['name'];
$senha = $_POST['passoword'];
$con = mysql_connect("mysql.hostinger.com.br","usuario_retirado","senha_retirada") or die("Error " . mysql_error($con));
$check = "SELECT * FROM SystemLR_unity" or die("Error in the consult.." . mysql_error($link));
$numrows = mysql_num_rows($check);
$result = mysqli_query($con, $check);
if ($numrows > 0)
{
$senha = md5($senha);
$ins = mysql_query("INSERT INTO SystemLR_unity ( 'id' , 'email' , 'nome' , 'senha' ) VALUES ('' , '".$email."' , '".$nome."' , '".$senha."') ; ");
if ($ins)
die ("User Criado Com Susseco!");
else
die ("Error: " . mysql_error());
}
else
{
die("Este User Ja Existe!");
}
?>