Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Dec 2015
    Posts
    2
    Member #
    52774

    User Authentication

    So I currently run a on line news paper and Ive decided that I now want to make it a paid service. Right now when a user goes to the site he/she can see/navigate anywhere they want. What i'd like to do is make it to where when they type in the address it gives them just the first article then if they want to see more then they need to subscribe. I'm currently using php and my database is using mysql and running on windows server 2012. If someone could please give me some pointers that would be great. If you have any questions please ask. My website is listed below.

    Free Press, WV

  2.  

  3. #2
    Junior Member
    Join Date
    Jan 2016
    Posts
    14
    Member #
    53168
    Liked
    1 times
    One way to do it is to create a session for each of the users that visits your page. Then add a variable to that session called, for example, visited_links and increment it by 1 on each page visited. If the user has been validated with the username and password the page will be displayed after visited_links has increased to 2 or will show a registration message instead. This is an easy way that lets you modify the number of pages that can be seen by guest users (2, 3 or any other limit).


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:09 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com