If is member ? If is 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

If is member ?

Started by antisa33, August 23, 2006, 11:08:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

antisa33

Hello
I have done a webpage with this code :

Quote
<?php

define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('test');
?>

  <?php

pagefooter();
?>

How to allow this page just for members ?
(if the guest is not a member, display a message : you must be a member to see this webpage.)
Thanks


Nibbler


<?php

define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('test');

if (!
USER_ID
{
    
msg_box('Login''You must be logged in to use this feature');
    
pagefooter();
    die();
}
?>


  <?php

pagefooter
();
?>


antisa33


Joachim Müller

...or use cpg_die instead of the message box plus pagefooter plus die.