Your code is not correct use this:
$userid = $_POST['userid'];
$pswd = $_POST['pswd'];
if($userid == "admin" && $pswd == "123")
{
$_SESSION['userid'] = $userid;
$_SESSION['pswd'] = $pswd;
header("Location: admin.php");
} else {
echo 'Ops! Please try again.';
}