Jump to content
php.lv forumi

sessions


hEiti

Recommended Posts

<?php
//Start session
session_start();
//Check whether the session variable
//SESS_MEMBER_ID is present or not
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID'])=='')) {
	header("location: error.php");
	exit();
}
?>

 

sheit ja nav ielogojies parmet uz error.php, ka lai panaku kad nedirekto bet tur pat parada kad neizdevas pieslegties?

meginaju echo "neizdevas pieslegties"; bet tad lapa nestrada vnk blanks un neielade saturu :(

Link to comment
Share on other sites

<?php
//Start session
session_start();
//Check whether the session variable
//SESS_MEMBER_ID is present or not
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID'])=='')) {
	header("location: error.php");
	exit();
}
?>

<?php
//Start session
session_start();
//Check whether the session variable
//SESS_MEMBER_ID is present or not
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID'])=='')) {
	echo "neizdevas";
	exit();
}
?>

Link to comment
Share on other sites

Klez bija taisniba.. bet problemu izdevas sekmigi noverst.. bet tagad sezu kasu galvu pie jaunas problemas

<?
				session_start();
				if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID'])=='')) {
				echo "";
				else
					 echo "_main"; 
				 ?>

Un nespeju saprast kapec vinsh negrib darit ... neko!

Link to comment
Share on other sites

×
×
  • Create New...