[SOLVED] How to get a date()?
Posted: Thu Oct 06, 2005 10:13 am
G'day (Yar),
I have a member database that runs on membership.
I'm trying to insert the date ($today) automatically in 'active',
Add 1 Year ($nextyear), and insert that value into 'expire'.
These are the different ways I've tried it, and nothing is passing...
or
into
I have a member database that runs on membership.
I'm trying to insert the date ($today) automatically in 'active',
Add 1 Year ($nextyear), and insert that value into 'expire'.
These are the different ways I've tried it, and nothing is passing...
Code: Select all
<?php
$today = date("F j, Y, g:i a");
$nextyear = date("F j, Y+1, g:i a");
?>Code: Select all
<?php
$today = mktime(0, 0, 0, date("m") , date("d"), date("Y"));
$nextyear = mktime(0, 0, 0, date("m"), date("d"), date("Y")+1);
?>Code: Select all
<input class="text" name="active" type="hidden" id="active" value="<? $today ?>">
<input class="text" name="expire" type="hidden" id="expire" value="<? $nextyear ?>">