Check premium expire


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I am making a simple file hosting site and want to check if users premium subscriptions have ended or not. In the database i have premium_start ( time() ) and premium_end ( time() ) that represents the start and end date.

Would the following code work to check if an account has expired?
Code: <?php
// check premium expire
if((time() - $member['premium_end']) >= time())
{
// do actions here
}
?>

thanks

No comments posted yet

Your Answer:

Login to answer
165 Like 44 Dislike
Previous forums Next forums
Other forums

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado
<tr>
&

str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to sa

the problem with str_replace
$str="hahahahahahahahahahahahahaha";
$nn=1;
$str=str_replace('ha','MyGod',$str,$nn);

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

Help with PHP Calendar code...
Hello, I'm new to this forum and I'm glad I found it.
I wrote this code for a PHP calendar as an

selection tool on raster image
Hi!
I have to implement in my app a selection tool which lets users to select region of any shape

MySQL issue
I am taking sentences through a form on page. Then checking some condition and trying to insert them

Changing files over
Just thought I'd start with the new forums looking really nice .

Ok basically I've made this

Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ig

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash