Check-In/out Php Web-Interface
#1
Posted 22 November 2012 - 05:52 PM
I used PHP-Login (http://www.php-login.net/) login system to make people login through it, however, I want all the users after they login to be redirected to another page and in this page I want to have like two buttons.
One of the buttons says "Check-in" and the other "Check-out" and each of the buttons has a time (HH:MM:SS MM/DD/YYYY) so once I press check-in it automatically checks me in and log that in a table let's say "checkin" and it will keep the date and time logged under user "X" and once the user X checks out, the time and date will be logged in a table called checkout
How can I make this? I've been looking for a long time and didn't find anything yet!
#2
Posted 23 November 2012 - 03:50 AM
If it's help your after show us the code you have tried already
if it's a script, your in the wrong place
function makePass($word=''){
$dbSalt = '$2a$07$'.substr(hash('whirlpool',$word),0,22);
$dbPass = crypt($word, $dbSalt);
return substr($dbPass,12);
}My SQL/PHP Blog
#3
Posted 24 November 2012 - 04:01 PM
function formatTime($microtime, $format)
{
list($timestamp, $fraction) = explode('.', $microtime);
return date($format, (int)$timestamp) . '.' . $fraction;
}
Does this code sounds right to log the accurate time of executing the button?
So let's say I make a button like this:
<form action="checkin.php" method="post">
<textarea name="Check me in!"></textarea>
<input type="submit" value="send" />
</form>
and the checkin.php would contain:
function formatTime($microtime, $format)
{
list($timestamp, $fraction) = explode('.', $microtime);
return date($format, (int)$timestamp) . '.' . $fraction;
}
but I don't know how to make it logged in a view able page for later reference.
Edited by aalsulaiti, 24 November 2012 - 04:07 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











