Mensa India Database Database
Home
Services
Auth Service
Naming Service
Reminder Service

Reminder

Renewal Reminder Service


Renewal Reminder Service

The Renewal Reminder Service is to allow Mensa Websites to pop-up reminders to Annual Members to pay their dues so their Membership does not lapse. If a member's membership is about to expire in March of the present year, a message can be displayed using this service from January. As soon as the member pays his dues (the database is updated with this information), the reminder will stop.

The Renewal Reminder Service is invoked by calling one of the naming files : http://indianmensa.org/db/services/reminder/reminder.php or http://indianmensa.org/db/services/reminder/reminderXML.php.
The membership no is passed as GET parameter. To specify the Membership No use the "MemNo" parameter.

Example

To find if the user with Membership No 11000012 is about to expire in March, you will make a call as follows :
http://indianmensa.org/db/services/reminder/reminder.php?MemNo=11000012

The resulting page is a plain text file with 2 lines. The first line gives the result code and the second line gives a description. Below is a list of the codes and their descriptions

CodeMessageExplanation
-2No Such MemberThere is no member with the given MembershipNo in the Database.
-1Membership ExpiredThe member's membership has already expired.
1Life MemberThe member is a life member.
Dues Paid MemberThe member has paid his dues.
0Dues Not Paid MemberThe member is currently active (dues paid) but has not paid fo the forthcoming year.

In case of the last message the website can pop-up a message reminding the member to pay his membership for the forthcoming year.

The file http://indianmensa.org/db/services/naming/namingXML.php returns the same output but parses it as XML.



How to use these files to get a Member's name.

Getting Member's renewal status with the help of these files is simple. You can write a funtion that calls this page and read its output.

Code Example

Say you are using PHP, your function would be as follows.

<?php
function getStatus($mem,&$msg)
{
$fp=fopen("http://indianmensa.org/db/services/reminder/reminder.php?MemNo=$mem);
$ret=fgets($fp,100);
$msg=fgets($fp,100);
return $ret;
}
if(getStatus($_GET["mem"],$msg)==0{print("Please pay your Annual Membership!");})
?>

This was merely an example using the plain text file. If you wish to you can use the XML file reminderXML.php. The GET parameters remain the same only the output format differs. The XML file can be used with PHP's XML functions or for that matter with any other language that supports reading XML. The main reason for including the XML file was to support future projects that may incorporate AJAX.


Example AJAX Implementation (using remoteXML.php)
Membership No :


Valid XHTML Valid CSS PHP
Copyright (c) 2008 Indian Mensa
The Mensa logo is a registered trademark of Mensa International Limited, all rights reserved.
Mensa does not hold any opinion, or have or express any political or religious views.