Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depreciated sql functions used #1

Open
FirdousBhat opened this issue Aug 5, 2017 · 1 comment
Open

depreciated sql functions used #1

FirdousBhat opened this issue Aug 5, 2017 · 1 comment

Comments

@FirdousBhat
Copy link

pls update the code

@Darlenequame
Copy link

deprecated SQL code used

modified code


$username = $_POST['username'];
$password = $_POST['password'];
$username = stripslashes($username);
$password = stripslashes($password);
$username = $mysqli->escape_string($_POST['username']);
$password = $mysqli->escape_string($_POST['password']);
$_SESSION['login_username']=$username;
$sql = "SELECT usertype FROM users WHERE userid='$username' and password='$password'";
$result = mysqli_query($mysqli);
$count = mysqli_num_rows($result);
$type = mysqli_fetch_array($result);
$control = $type['usertype'];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants