Im new to PHP/JS ... I searched everywhere and the only answer Im getting is ajax... which I do not under stand at all!
I have this Birthday (Javascript) Script.. which works... but I need the result from that birthday script to work with my PHP script.. here is the birthday.php
<script language="JavaScript">
var arrBday = [
['@user1','10/12/1984'],
['@user2','1/1/1900'],
['@user3','10/12/1984'],
['@user4','10/12/1984'],
];
function displayBdayList(today){
var bday,strList='';
for (var i=0;i<arrBday.length;i++){
bday = new Date(arrBday[i][1]);
if (!isNaN(bday) && bday.getMonth()==today.getMonth() && bday.getDate()==today.getDate())
strList+=' '+arrBday[i][0]+" ";
}
if (strList=='') strList='- Nobody Has a Birthday Today'
document.write("Happy Birthday: "+strList)
}
displayBdayList(new Date());
</script>
The outcome will be "Happy Birthday: @user @user @user" I want that outcome to be sent to another PHP file to be used as a variable. But dont know how to use ajax at all.... Im aware that PHP works before Javascript... so is there anybody that can help me out with this? Would greatly appreciate it