if ($_SERVER["REQUEST_METHOD"] == "POST") {
$email = $_POST['email'];
$viewemail = $_POST['viewemail'];
$gender = $_POST['gender'];
$birthdayyear = 0 + $_POST['birthdayyear'];
$birthdaymonth = 0 + $_POST['birthdaymonth'];
$birthdayday = 0 + $_POST['birthdayday'];
$country = 0 + $_POST['country'];
$lang = 0 + $_POST['lang'];
$favpet = $_POST['favpet'];
if (strlen($birthdayyear) == 2) {
$fourdig = date_create_from_format('y', $birthdayyear);
$birthdayyear = date_format($fourdig, 'Y');
if ($birthdayyear > date('Y'))
$birthdayyear = $birthdayyear - 100;
}
die($birthdayyear);
the page will not display the value, but if i write die('sd'.$birthdayyear); I'll get "sd1988". This is when I'm posting the value "1988" but for some reason it works if I just post "88".. So what am I'm doing wrong?
Thanks