there is logout facility in my site now the problem is if the user clicks on that logout link he logs out showing him the home page but if he clicks on the logut link once more he is shown a page with a message Access denied instead i want him to show the home page.is there any php code so that if the user logs out he is not shown the logout link
How about just an if statement to see if the user is logged in before displaying the logout file?
if( user_is_logged_in() ) { // Display Logout Link }
Assuming you had a function named user_is_logged_in() - replace with whatever code you're using.