session_start();  
	  // undefined index: login
	if (!isset($_SESSION['login'])){
		echo "Anda tidak berhak mengakses halaman ini.";
		exit();
	}
	
	//Fungsi baca data dari database

Hi,

Whenever I press eventmanager, the following error appears:

"Anda tidak berhak mengakses halaman ini."

What codes should I write so that I could pass the echo?

Thanks.

Recommended Answers

All 2 Replies

you need to set login session or just

session_start();
// undefined index: login
if (isset($_SESSION['login'])){
echo

the code after session login is running but logically confusing since ""Anda tidak berhak mengakses halaman ini." means "You are not allowed to access this page."

so is it still correct if write if (isset($_SESSION)) ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.