0

The message is not showing. Please help me. Thanks

<?php
/* logout.php */

require('obj.php');


session_destroy();
	

	$_SESSION['msg']='You have successfully logged out. Thank you for the visit.';
			
		header('Location: '.$kPathUrl->adminUrl.'/login.php');
			exit;
			

?>
2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by jogesh_p
0

The message is not showing. Please help me. Thanks

Your session already destroyed, then the $_SESSION will not work. try to use javascript to alert message and redirect it to another page, cause you will not echo anything before header();

Do this >>

<?php
session_start();

require('obj.php');

session_destroy();
	

echo '
<script type="text/javascript">
alert("You have successfully logged out. Thank you for the visit.");
window.location = "your_url_here";
</script>    
';

exit();			

?>

hope this help you >>

0

Finally, its working...thank you so much..:)

0

Finally, its working...thank you so much..:)

Please mark it solved, if you solved your question,,,

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.