Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Date cancels access

Community Beginner ,
Apr 13, 2010 Apr 13, 2010

Is there some way to dynamically using PHP and MySQL prevent access to members-only pages to an individual whose membership has expired based on a due date column in the table? Or do they have to be manually removed from the table?

TOPICS
Server side applications
482
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 14, 2010 Apr 14, 2010

Of course. To tell the visitor that their membership has expired, retrieve the due date column and compare with the current date. Or if you just want to restrict access without notifying them, compare the expiration date to the current date in the sql where clause.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 15, 2010 Apr 15, 2010

Great, thanks for that confirmation. Being quite new to working in dynamic environments, is there a specific procedure for how to do this you could point me to?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 15, 2010 Apr 15, 2010

No, nothing specific. How did you create the code that is currently restricting access? Are you using DW server behaviors for this? If so, you will need to modify those which means becoming familiar with your server side scripting language.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 15, 2010 Apr 15, 2010

I haven't settled on an approach yet. Still looking at some of the David

Powers info and the reference provided in another thread to a separate

question of mine. Both approaches are based on the DW server behaviors

though. Again being new and very naive to the techniques here, is there

a DW behavior that addresses this fairly directly?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 16, 2010 Apr 16, 2010

I don't think the DW server behaviors handle this - you would need to modify them. Be aware that once you modify the behavior code, you effectively break the behavior interface so you will then need to make any change to the code on that page by hand.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2010 Apr 17, 2010
LATEST

OK well I guess I'm back to where I began. Thanks for

giving it a go trying to help.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines