If is member ? If is member ?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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.