a php site only for member a php site only for member
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

a php site only for member

Started by DaBe, January 25, 2008, 08:43:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DaBe

Hello

How I can make a normal php page only for the member avaible?



Nibbler

You need to include coppermine's include/init.inc.php and then check that the USER_ID constant is nonzero.

Joachim Müller

Something like<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('Hello member');
if (!
USER_ID) {
    
cpg_die(ERROR$lang_errors['access_denied'], __FILE____LINE__);
}
?>

Your custom content here
<?php
pagefooter
();
?>
should do the trick.