Forum Moderators: coopster
I have a mysql table where I hv user name and password etc.
I have another mysql table with username and user work hour, user performance rating and number of days worked.
As soon as the user login to the site, I want to show the user his work hour till tht date, his performance ratng till that day and total number of days he has worked till tht date.
I am using php and mysql, so how to accomplish this?
Can some one help me with the code to accomplish this objective. I will really be glad for the help.
Anyway I have been able to pull the user specific data from the table but there is still a minor issue. When the user logs in for the first time it does not show the data. If user logs out and logs in again, it shows the user specific data.
I am using the following code:
<?php $q=explode('¦',end($_COOKIE));
$login=$q[0];
$k=mysql_query("select * from user_data where user_login = '$login' limit 1;");
$r=mysql_fetch_assoc($k); ?>
<ul><li>
<?php echo $r[Days worked]; ?><br>
<?php echo $r[Money earned]; ?><br>
<?php echo $r[Efficiency]; ?><br>
<?php echo $r[Completed task]; ?><br>
</li></ul>
So where is the issue that is not pulling data in the first login itself.