$_SESSION['kod'] = rand(1000,9999);
random session..

$_SESSION['kullaniciadi'] = 'kullaniciadi';