im attempting to add date of birth and age to a form and database the date of birth works fine and shows in database as it should be but the age is showing 0 in age column ive tried different things after searching and its staying the same
heres the code for age and date of birth in the php block
$year = $_POST['year'];
$month = $_POST['month'];
$day = $_POST['day'];
$DOB = $year . "-" . $month . "-" . $day;
$age = $_POST['age'];
And here is the database string
mysqli_query($conn,"INSERT INTO signup (f_name,email,password,DOB,age,memtype) VALUES ('$fname','$email','$EncryptPassword','$DOB','$age','$memtype')");
date of birth is set as DATE database
age is set as int 5 in database
is there anythin gim missing of not quite right ty in advance jan x