Jump to content


Photo

Check-In/out Php Web-Interface


  • Please log in to reply
2 replies to this topic

#1 aalsulaiti

aalsulaiti

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 22 November 2012 - 10:52 PM

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!

#2 Muddy_Funster

Muddy_Funster

    Advanced Member

  • Members
  • PipPipPip
  • 3,383 posts

Posted 23 November 2012 - 08:50 AM

This is about as simple as it gets, are you here asking for help to code this or for another script to download?

If it's help your after show us the code you have tried already

if it's a script, your in the wrong place

Please: "This doesn't work..." is not a question.  We're not the government: we don't have anything to view what your doing on your computer.  Help us help you by asking a good question.

 

"Things needed to ask a "good" question:

  • A description of the context of your issue (Optional but can be a huge help in certain circumstances)
  • What is the actual problem (Mandatory)
  • What does the code actually do (Mandatory)
  • What you think the code should do / What you want the code to do (Mandatory)
  • What things have you tried so far (Optional, but missing it out just wastes your time and ours)
  • The actual code as you are running it - minus any personal information like Database Login Credentials (Mandatory - don't just post pseudo, the vast majority of issues are syntax and not logic)
  • As much info about your development environment as you can give - even if it's just letting us know you are using a hosting provider instead of a local install (Optional, but some questions can not be answered without it.)

#3 aalsulaiti

aalsulaiti

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 24 November 2012 - 09:01 PM

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, 24 November 2012 - 09:07 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users