<?session_start();//make sessions available on this page;
include "conninfo.php";
$un=$_POST["username"];
$pw=$_POST["password"];


$query="SELECT * FROM people WHERE firstname like '$un' AND password like '$pw'";
//echo $query;
$result=mysqli_query($link,$query);

$numrows=mysqli_num_rows($result);//1 if correct, 0 if incorrect

if($numrows==1)
{
echo "Correct username/password";
$_SESSION["username"]=$un;?>
 <a href="secret.php">Go to my secret page</a>
<?
}
else
{
echo "Sorry, wrong username/password";
	
}



?>