Hi Guys,
I really don't not know where I'm going wrong with this. I am learning PHP. I have been able to input a user birthday on registration on my website using a list menu such as is on facebook. I however just cant be able to extract the date, month and year separately if i need to.
MySQL "users" table(only a portion)
username user_birthday
-------- -------------
kkjay 1975-04-16
gregory 1955-09-27
My PHP code is:
<?php require_once('Connections/connections.php'); ?>
mysql_select_db($database_connections, $connections);
$query_birthdate = "SELECT day(user_birthday) FROM users WHERE username='kkjay'";
$birthdate = mysql_query($query_birthdate, $connections) or die(mysql_error());
$row_birthdate = mysql_fetch_assoc($birthdate);
echo $row_birthdate;
I keep getting the word array when I echo the result instead of getting 16.
I would really appreciate any help on how to solve this. Thanks in advance.