<?
if (isset($_SESSION['user'])){
echo "ты авторизован";
}else{
//**************************************************
$data = $_POST;
if( isset($data['do_signup']))
{
if ( $_POST['remember'] == '')
{
//не актив кнопка
session_name("user");
} else {
session_set_cookie_params(86400*30);
session_name("user");
}
session_start();
$_SESSION['user'] = 444;
}
//**************************************************
}
session_name("user");
session_start();
?>
<form id="register" action="" method="POST">
</p><p><strong>Запомнить меня</strong>:</p>
<input name='remember' type='checkbox' value='1'>
<p>
<button type="submit" name="do_signup">войти</button>
</p>
</form>