Skip to content

Instantly share code, notes, and snippets.

@netwons
Created January 21, 2018 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netwons/848215982cd8998cd7cfa0fe64cc97d6 to your computer and use it in GitHub Desktop.
Save netwons/848215982cd8998cd7cfa0fe64cc97d6 to your computer and use it in GitHub Desktop.
<?php
$username=$_POST['username'];
$password=$_POST['password'];
//$d=encript($password);
$query=" SELECT * FROM register WHERE username='$username' AND password='$password'";
echo $query;
$result=mysqli_query($connection,$query);
$count=mysqli_num_rows($result);
if($count==1){
header("Location: welcome.php");
}else{
echo "<br>error";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment