わかりました、最後の質問を解決したばかりで、もう一度助けが必要です...認証コードを修正しましたが、プロファイルにログインするたびに、自分のサイトにログインしていないと表示されます. access-denied.php コードは次のとおりです。
<title>Access Denied</title>
<link href="loginmodule.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Access Denied </h1>
<p align="center"> </p>
<h4 align="center" class="err">Access Denied!<br />
You do not have access to this resource.</h4>
そして、これが私のauth.phpコードです:
//Start session
session_start();
//Check whether the session variable SESS_MEMBER_ID is present or not
if(!isset($_SESSION['email']) || ($_SESSION['password'])){
header("location: access-denied.php");
exit();
}
そして、ここに私のプロフィールページのコードがあります:
<?php session_start(); ?>
<?php include("inc/incfiles/loggedheader.php")?>
<?php
require_once('auth.php');
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Member Index</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Welcome <? if(isset($_SESSION['SESS_fname'])){
echo $_SESSION['SESS_fname'];
} ?></h1>
<a href="member-profile.php">My Profile</a> | <a href="logout.php">Logout</a>
<p>Welcome to your profile! </p>
</body>
</html>
プロフィールにログインできないのはなぜですか? 私はこのタイプの PHP について何も知りません。まだほとんど学んでいないのですが、私の友人 (私のサイトの構築を手伝ってくれています) がコードを入手し、メールで送ってくれました。