Jump to content

Recommended Posts

Hello,

 

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!

Link to comment
https://forums.phpfreaks.com/topic/271054-check-inout-php-web-interface/
Share on other sites

I have scripts for login/registration which is working great, now I want once someone login to be able to view two buttons one says "Check-in" other says "Check-out" once I press "Check-in" Let's say for instance the time zone is GMT +3 It will log the exact time of the check in and once checked out it will log the exact time of checking out.

 

 

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
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.