Listens: Run to the Hills

PHP age verification

Hi everyone,
I'm a bit green with php and having a problem with some code that's driving me nuts. I'm hoping someone may help. I suspect the problem is very simple and probably my understanding of how things work.

I'm building a site for an alcohol company, and as such there needs to be age verification on the front page, to get people to "prove" they're of the legal drinking age in their country. This is done with a simple select dropdown list for the day, month, and year, with a checkbox for if the user should stay logged into the machine.

When this code is submitted, it's sent to another php page. Here's the code:
<?php
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];

if (isset($_POST["stay"])) {
    $stay = yes;
}

$this_day = date(d);
$this_month = date(m);
$this_year = date(Y);
$day_val = $this_day - $day;
$month_val = $this_month - $month;
$year_val = $this_year - $year;

if ($year_val >= 18&&$month_val >= 0&&$day_val >= 0) {
    if ($stay = yes) {
        setcookie("bb", "bb", time()+1814400);
        header('Location: main.php');
    }
    else {
        header('Location: main.php');
    }
}
else {
    header('Location: index.php?fail=yes');
}

?>

The age verification isn't so much the problem, that works without issue. What I'm trying to do is if the $_POST['stay'] is ticked in the age verification page, then the user should not encounter the age verification page until the cookie expires or the cookie is cleared from the browser, and instead be passed straight to main.php.

The cookie works fine, too. It is a matter of determining if $stay / $_POST['stay'] has been ticked, or not. In the current (above) form it seems the cookie gets applied every time.

Any suggestions?