<?php require_once 'dblogin.php'; require_once 'dbaccess.php'; $username = $_GET['username']; $db = new dbAccess($host, $user, $password, $database); $where = "username = '******'"; $result = $db->selectDB('users', $where, '', ''); $result->data_seek(0); $row = $result->fetch_array(MYSQLI_ASSOC); if ($row['username'] == '') { if (strlen($username) > 4) { echo "<span class=\"validUser\">Username : Valid <span class=\"glyphicon glyphicon-ok\" aria-hidden=\"true\"></span></span>"; } else { echo "Username : "******"<span class=\"invalidUser\">Username : Invalid <span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span></span>"; }
<?php require_once 'dblogin.php'; require_once 'dbaccess.php'; require_once 'headbar.php'; require_once 'generator.php'; $username = "******" . $_POST['username'] . "'"; $userPassword = "******" . crypt($_POST['password'], 'BYCRPYT') . "'"; $where = "username = '******' and password = '******'"; $db = new dbAccess($host, $user, $password, $database); $result = $db->selectDB('users', $values, '', '', ''); if ($result) { $_SESSION['username'] = $_POST['username']; header("Location: homepage.php"); }