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

FTP issues
Hi all,


I am currently facing some serious problems with a script and really need some ad

PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server runnin

Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:
"a.b.c.d.e.f&

need Array help
This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Gian

close site for maintenance
i get a tutorial, saying the following code can put our site offline, and only the developer can vie

Content-Disposition: attachment; filename=... not working as i thought it should
taken the following code from the php.net site the script is not working.

what is not happeni

Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this

couldn't connect to your database
Hello I am new to php mysql

Actually i have read A tutorial on nettuts
"http://net.tu

Contact Form Not Working When I Add Validation Codes
So I built my first working PHP "Contact Us" like form. But, I have been trying to now mak

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

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