I need help!

venatusdev

VenatusDev

Posted on June 30, 2019

I need help!

So me and my friend are making an RPG website for fun and we've run into a problem. We suck at PHP. We are so bad that we dont even know how to pull out one value from an SQL query. Please can someone help us get the 'name' value from this SQL query in PHP7. Thanks!

<?PHP
session_start();
$email = $_POST['email'];
$password = sha1($_POST['password']);

$con = mysqli_connect('CENSORED','CENSORED','CENSORED');
mysqli_select_db($con, "BATTLE");

$q = "SELECT * FROM players WHERE email == '$email'";
$result = mysqli_query($con, $q);
$num = mysqli_num_rows($result);
if($num == 0){
$_SESSION['email'] = $email;
// GET THE NAME!!
}
?>

💖 💪 🙅 🚩
venatusdev
VenatusDev

Posted on June 30, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related