hi
I am struggling with this one.
I have a database which includes 3 fields "current date" "date last visited"
"reward points"
I would like the visitor to be rewarded points based on the difference between the two dates. This is what I have so far to get the difference in dates. This is just a mixture of ideas I found in the forum so I have no idea if it is correct.
$compare2 = &date_to_unix($get_date);
$total = $compare2-$compare1;
$rec{rewardpoints} = $total
Now assuming this is the code(a big assumption), where would I put it if I wanted this information to be updated as soon as the visitor logged in.
I am a complete perl novice so help is appreciated.
I would like to have
I am struggling with this one.
I have a database which includes 3 fields "current date" "date last visited"
"reward points"
I would like the visitor to be rewarded points based on the difference between the two dates. This is what I have so far to get the difference in dates. This is just a mixture of ideas I found in the forum so I have no idea if it is correct.
Code:
$compare1 = &date_to_unix($rec{'datelastvisited'}); $compare2 = &date_to_unix($get_date);
$total = $compare2-$compare1;
$rec{rewardpoints} = $total
Now assuming this is the code(a big assumption), where would I put it if I wanted this information to be updated as soon as the visitor logged in.
I am a complete perl novice so help is appreciated.
I would like to have