Jump to content

[SOLVED] ARRAY (age reconision)


xyn

Recommended Posts

Hii, peeps.

 

I haven't stumbled into this problem for months, and now

I don't know how to get around it, Basically i'm taking

CURRENT DATE and using strtotime() and taking away 13 YEARS

i am then impploding the date of birth using the same date method

but i keep geeting "array" return..

 

 

My code

 

//CheckAge
$today  = date("d/m/Y");
$birth  = date("d/m/Y", strtotime("$today - 13 Years"));
$dob    = array();
$dob[]  = $_POST['day'];
$dob[]  = $_POST['month'];
$dob[]  = $_POST['year'];
$dateob = implode("/", $dob[]);

echo($dob."<br>".$dateob);
exit;

Link to comment
https://forums.phpfreaks.com/topic/39136-solved-array-age-reconision/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.