954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

$_SESSION['login']

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.

davy_yg
Posting Whiz
377 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

you need to set login session or just

session_start();
// undefined index: login
if (isset($_SESSION['login'])){
echo
perfectweb
Newbie Poster
14 posts since Feb 2011
Reputation Points: 10
Solved Threads: 2
 

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['login'])) ?

davy_yg
Posting Whiz
377 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: