Hi i try to make a protected page with my own php code. but it displays the php code even if i use the sourcecode tab instead of interpret the code. need help thank you
i used the option in admin menu products -> protected content -> pages (Tab) i added some php code in the wysisyg editor in use of the sourcecode option but when i save the content, the php code is displayed on the page instead of interpreted. for example i insert <?php echo "test"; ?> and click save. when i open the link , the site opens but it does not display the word "test" so amember does not interpret php....
Question was what is the web address of the page in question not what you inserted within the page. aMember does not interpret php, the server does when it parses the page. To do this you have to tell the server the page contains php instructions by using file extensions such as '*.php' If the file extension is a plain 'html' one such as '*.html, *.htm' the php instructions will be treated as html and simply printed on the screen. So for your example you would see <?php echo "test"; ?> on the screen. A slight complication to the above! Above applies if you are calling a page as a complete entity in itself such as 'mydomain/thepage.htm however if that page is called as an 'include' (or a 'require') from within a php page then the html page is inserted within the php page and then the *.htm extension is ignored and the page is treated as being part of the php page.
I've added information how to protect PHP scripts http://www.amember.com/docs/Content/PHPScripts check also http://www.amember.com/docs/API/Lite
Is it possible to use Am_Lite::checkAccess(array(1,3), 'My Protected Page Title'); with groups rather then individual products? David
I think it would be simpler in some cases to protect content in groups rather than having to update the product number as you add products, you would add them to the existing protected group- unless I am misunderstanding the new group feature. David