(レンタルサーバーを使用するので)
(レンタルサーバーを使用するので)1.1st.php↓lt;?php@session_start;$passquot;1111quot;login();functionlogin(){global$admin_pass;if(isset($_POST[pass])){$passhtmlspecialchars(stripslashes($_POST[pass]));}if($pass!$admin_pass){unset($_SESSION[login]);header(quot;location:1st.phpquot;);}else{$_SESSION[login]$pass;header(quot;location:2nd.phpquot;);}}?gt;2nd.php↓lt;?php@session_startlogincheck();functionlogincheck(){if(!isset($_SESSION[login])){header(quot;location:1st.phpquot;);exit();}}?gt;このような形で実行するとPCブラウザでは機能するですが、携帯からですと2.phpは開けませんheader(quot;location:2nd.php?quot;.htmlspecialchars(SID));で大丈夫だと思いますけど