don't know why this check don't even show some echo text ...someone please explain me why. Posted all the code, hope you will solve the problem now... tried all of the codes you gave me but still nothing
<?php
$servername = "localhost";
$dbUsername = "db_admin";
$dbPassword = "123";
$dbName = "DB";
$dbTable = "login";
$salt = '';
$salt .= substr(str_shuffle(sha1(microtime())), 0, 40);;
$value_user =$_POST["usernameReg"];
$value_pass = $_POST["passwordReg"];
$value_pass = $salt . $value_pass . $salt;
$value_pass = sha1($value_pass);
$logCookieHashed = $salt . $value_user . $salt . $value_pass . $salt;
$logCookieHashed = sha1($logCookieHashed);
$conn = mysqli_connect($servername, $dbUsername, $dbPassword, $dbName);
$sqlGetID = "SELECT id FROM login ORDER BY id DESC LIMIT 1";
$result = mysqli_query($conn, $sqlGetID);
$row = mysqli_fetch_array($result);
$ID = $row['id'] + 1;
$addAcc = "INSERT INTO login (id, username, password, pwHash, logCookieHashed) Values (\"". $ID . "\", \"" . $value_user . "\", \"" . $value_pass . "\", \"" . $salt . "\", \"" . $logCookieHashed . "\");";
if( isset( $_POST["usernameReg"] ) ) {
$selectAcc = mysql_query("SELECT * FROM login WHERE username='$value_user'");
if(mysql_num_rows($selectAcc)>0)
{
echo "Username already taken";
}
else
{
mysqli_query($conn, $addAcc);
echo "You are now registered<br/>";
}
}
?>