User Profile

Collapse

Profile Sidebar

Collapse
Bannu
Bannu
Last Activity: Sep 25 '12, 06:38 AM
Joined: Sep 24 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Bannu
    replied to How to print an echo statement before header
    in PHP
    Thanks for the replies @Johny,jdstanko sky

    Code:
    if(!isset($_SESSION['aid']))
    	{
    		header("location:index.php");
    		exit;
    	}
    	session_destroy();
    	echo "Successfully logged out from Admin Page";
    	
    	?>

    Finally I wrote the code as above.

    After log out it dispelling the echo statement. When I refresh the page it is redirecting to the index page.....
    See more | Go to post
    Last edited by Dormilich; Sep 26 '12, 05:43 AM. Reason: Please use [CODE] [/CODE] tags when posting code.

    Leave a comment:


  • Bannu
    started a topic How to print an echo statement before header
    in PHP

    How to print an echo statement before header

    Hi All,

    I prepared a project where session starts while log in and will be log out by checking through the same session. When I log out from the page I kept header("locatio n:index.php"); so it redirects to the log in Home page as per my code. Well, now I would like to print a statement SUCCESSFULLY logged out along with the index page. Tried many ways and used ob_end_flush(); but unable to meet my requirement.
    ...
    See more | Go to post
No activity results to display
Show More
Working...