Search
Left Quote    Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: Member System in action ?
  This user is online  Guest
  Subject: "Member System in action ?" Posted: @ 10:52 am on Oct 16 2005   
Unregistered
In regard to

    Viewed: 7,303 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: Member System in action ?" Posted: @ 11:03 am on Oct 16 2005    
Unregistered

Post Deleted.



    Viewed: 7,296 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: Member System in action ?" Posted: @ 11:04 am on Oct 16 2005    
Unregistered

Help will be appreciated!



    Viewed: 7,292 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Member System in action ?" Posted: @ 2:03 pm on Oct 16 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

easy, if you setup your members system as the tutorial indicates, you created a session variable called $_SESSION['log ged_in'].

If a member is signed in, you set $_SESSION['log ged_in'] = 1; if they are not logged in, $_SESSION['log ged_in'] = 0

SO... encapsulate the code that displays your forms to post and all within a condition like this:


Code:


if($_SESSION[' logged_in'] == 1) {

//display post forms and all

} else {

echo("Sor ry, only members can post. If you want to post, you must first register!" ;

} //done.




-bs0d | AllSyntax.com

    Viewed: 7,286 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: Member System in action ?" Posted: @ 3:44 pm on Oct 16 2005    
Unregistered

Thank you very much: Good answer, fast response !!! Thanks again !



    Viewed: 7,281 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank