Hello , I want to just hide a single paragraph inside my custom built website using PHP Include and show it for members only .... Can you help me ! :>
One way would be to check if the visitor is logged into aMember and then simply include the 'include' only if they are logged in using an if statement.
Here is example: Code: // Should be placed at the top of the file session_start(); ....... if($_SESSION['_amember_id'] && $_SESSION['amember_user'][status]){ // User logged in and active include "/path/to/file"; }
I used this on my php page: When members login it says: They can log in to amember quite alright but not to the protected page.
it worked for me except i changed $_SESSION['amember_user'][status]) to $_SESSION['_amember_user'][status]){ Pleaser note the difference between amember_user and _amember_user'