Is there a script that does this?? Need some suggestions.

by 11 replies
13
Hey Warriors,

I wanted to know if there was a script that could restrict access to a specific page in the person unsubscribes.

For example, lets say someone wants to use my tool for free and they register with an email to have free access to the tool. Now, lets say they unsubscribe to the tool/email newsletter, I want to deny them access because they are no longer subscribed?

Basically if they are on the email list, they have access to the tool if they are not on the list or unsubscribe, they no longer have access.

Any ideas?

Thanks,

Jerry
#programming #script #suggestions
  • Depending on the software you use for your newsletter the process could be extremely easy.

    Very easy...
    1. check newsletter user database for existence of user (if they unsubscribed they should be removed from the db)
    2. if user account exists allow access, otherwise deny.

    Could be done with PHP+MySQL with minimal effort.

    Code:
    mysql_query("select username from newsletter_table_name where username = 'theuser' limit 1");
    if(mysql_num_rows()==1){
       // allowed to see this content
    }else{
       // denied!
    }
    Would help if we knew exactly what newsletter software you're using or plan to use.
    • [1] reply


    • I'm currently using aweber.
      • [1] reply
  • Luxmo - Perfect answer!
  • Just a basic login system would do that checks against a database. If they aren't an active members then they can't access the tool.
  • Agree with AndyBlackSEO have them login to view the page, simple. You need access to the database with your users in it though
  • Read through the whole thread before posting guys, thanks.
  • I thought the comment was of use because nowhere before Andys post was there any talk of a login
    • [1] reply
    • Look four posts above his.
      It's cool though I'm new here too...still gettin the feel of things.
  • I completely understand what you're saying. I understood it but for someone who doesn't understand the way things work they my be confused as to where 'theuser' is assigned a value.

    I'm sorry if I misinterpreted your post
    • [1] reply
    • Well, I basically just outlined the concept and did a little bit of theory processing. Of course I didn't get into the details of everything...there's just too much. Like the MySQL table would need to have the comment_id auto_increment and be primary key, the table would also contain email and other info, database connection would need some processes added for security, etc...and yes, the 'theuser' would be a variable that would come from either a cookie or after the user has logged-in.

Next Topics on Trending Feed