Jump to content

Only allowed users who are logged in to view page?


Recommended Posts

I've moved my blog to a sub-directory, and and i want to make a website (i don't know what yet) in the main directory, but i want only registered/signed in users to be able to view some pages. I'm going to use mysql to hold user names/passwords/emails ect. and i'm going to use php for signup scripts ect. but how do i restrict access to parts of the website.

I'd also like to be able to have different user groups (member, super member, admin, mod ect.) with diffrent access levels. any help?

 

thanks!

Proud Ubuntu User!

There are no stupid questions, just stupid people. -Scott Adams

A computer once beat me at chess, but it was no match for me at kick boxing.-Emo Phillips

My Blog!

TyrantElf.png

TyrantElf.png

Link to comment
Share on other sites

If you're running on wordpress, just use that as your site's CMS. It's powerful enough to do it.

You can just switch your blog's posts to appear on another page.

 

If you're insistant on doing it the long way, then this guide may be of help. I haven't really looked at it that much, but it looks sound. If that's not good, just google "Wordpres integration".

 

If you're not using Wordpress, just google "YourBlogPlatform Integration". I'm sure someone's found a way.

Link to comment
Share on other sites

Use the $_SESSION and $_COOKIE variables to hold the data about there login. Then have an check setup to run before they view the page, if the cookie/session is good show the page otherwise redirect to a login page or display a message.

[hide=Drops]

  • Dragon Axe x11
    Berserker Ring x9
    Warrior Ring x8
    Seercull
    Dragon Med
    Dragon Boots x4 - all less then 30 kc
    Godsword Shard (bandos)
    Granite Maul x 3

Solo only - doesn't include barrows[/hide][hide=Stats]

joe_da_studd.png[/hide]

Link to comment
Share on other sites

Use the $_SESSION and $_COOKIE variables to hold the data about there login. Then have an check setup to run before they view the page, if the cookie/session is good show the page otherwise redirect to a login page or display a message.

This. If you want all the different levels, then you can assign the levels a number and check what the number is, then choose what to display.

polvCwJ.gif
"It's not a rest for me, it's a rest for the weights." - Dom Mazzetti

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.