首先假设已经知道怎么取得表单post过来的值。表单提交后session_start();//启动session$_SESSION['username'] = $username;其它页面要使用时则:session_start();//启动sessionprint_r($_SESSION);