Web Analytics Made Easy -
StatCounter Hiding page until user is registered - CodingForum

Announcement

Collapse
No announcement yet.

Hiding page until user is registered

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hiding page until user is registered

    how can i hide some of my context until a user is register, then he/she will be able to see it. thanks.

  • #2
    Create row in where you have your user details called registered and have it be a tiny int. Now you would do something like this

    PHP Code:

    if ($row["registered"] == "1") {
    //display content
    } else {
    echo 
    "Please register to view content";

    To make this work when they register run a query to change the value of registered to to "1"

    Their are many other ways to do this with a session but this is just a small example hope it helps

    Comment

    Working...
    X