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

single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be

Problem in String replace program's output
Hi all,
I was trying to make a program which accepts a string and replaces it with another stri

PHP Tab Control
Hi All,

I would like to have PHP tab control with/without Javascript.

But I want to r

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

Tree Menu
Hi guys,

Can anyone help me making a tree navigation system? I have a site where I'm allowin

How to schedule the a job?
Hi,
I have prepared a task ( i.e. a procedure is prepare the file and send the same to con

PECL uploadprogress for php5.2
Hey, I just installed PHP5 via .htaccess on my 1and1 Shared Hosting Account.

How would I exac

Sequre login with cookies.
I want to build secure login with cookies. I just want your ideas about this, your suggestions. What

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

Confusing Functions
So, I've been reading up on Functions and I like them! However, I need some help using variables in

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