Atlanticas Posted October 23, 2006 Share Posted October 23, 2006 Basically my site only notifies members "Wrong Username or Password" but I would like to somehow add an option where it would instead say "Membership expired" or even better 'Membership expired on 00/00/0000" when they attempt to access the site. Here is the part of the coding that shows up, so not sure if this is enough.[code]<?php/* *************************************************************************** *************************************************************************/class auth{/***************************************************************** function login(&$ld) ******************************************************************* @Description: ** ******************************************************************* @Parameters: ** &$ld ******************************************************************* @return *****************************************************************/function login(&$ld) { $dbu= new mysql_db; $now=strtotime("now"); $dbu->query("select member_id, password from member where username='".$ld['login']."' and active2='1' and active1='1' and exp_date > '".$now."'"); if($dbu->move_next()) { if($ld['password']==$dbu->f('password')) { session_start(); $_SESSION['uid']=1; $_SESSION['u_id']=$dbu->f('member_id'); $ld['u_id']=$dbu->f('member_id'); $ld['pn']="redirect"; return true; } } //$ld['error'].=gettext("Invalid Login or Password provided! <br>"); $ld['error'].=gettext("Wrong Username or Password <br>"); return false; }/***************************************************************** function logout(&$ld) ******************************************************************* @Description: ** ******************************************************************* @Parameters: ** &$ld) ******************************************************************* @return *****************************************************************/function logout(&$ld) { $_SESSION['uid']=0; $_SESSION['u_id']=0; unset ($ld['fn']); $ld['pn']='login'; session_destroy(); return true; }}//end class?>[/code] Link to comment https://forums.phpfreaks.com/topic/24829-trying-to-have-php-database-notify-of-expiry-date/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.