Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Total Login Time


How can I know that when a user is logged in? Like I want to store each login and logout time of each user in a database.




View Complete Forum Thread with Replies

Related Forum Messages:
Ow To Add Then Display The The Total Amount Of Time For A Given Set Of Time Stamps.
I need to know how to add then display the the total amount of time for a given set of time stamps. For example my page looks like this:

task--------time
1-----------start at 8:00
1-----------end at 8:10
2-----------start at 8:12
3-----------start at 8:13
2-----------end at 8:14
3-----------end at 8:20
//notice there is no 8:11

I need to add then display the total amount of time it took for all tasks. Then
separate the individual tasks then figure and diaplay the total amount of time
needed for each individual task. Code:

View Replies !
Add Timestamps To Get Total Time
how to even start to do this. I need to know how to add then display the the total amount of time for a given set of time stamps. For example my page looks like this:

task--------time
1-----------start at 8:00
1-----------end at 8:10
2-----------start at 8:12
3-----------start at 8:13
2-----------end at 8:14
3-----------end at 8:20
//notice there is no 8:11

I need to add then display the total amount of time it took for all tasks. Then
separate the individual tasks then figure and diaplay the total amount of time
needed for each individual task. Code:

View Replies !
Get Video File Total Time Of Playing
I have uploaded the video file to server. we need to get the total time of playing file duration and store the values to database. how can i get the total time for uploaded video file?

View Replies !
Find The Total Time Each Visitor Spent
I have web site and want to find the total time each visitor spent(after login) on my site's specific php page eg.www.mysite/profile.php. How i do it ?

View Replies !
Elapsed Time Function - How Do I Convert It To Only Total Seconds?
Below is a good elapsed time function I found. However, I'd like to return
total seconds instead of broken down into days, hours, minutes & seconds.
In other words, I want "125" instead of "2 minutes 5 seconds".

function calcElapsedTime($time)
{ // calculate elapsed time (in seconds!)
$diff = time()-$time;
$daysDiff = floor($diff/60/60/24);
$diff -= $daysDiff*60*60*24;
$hrsDiff = floor($diff/60/60);
$diff -= $hrsDiff*60*60;
$minsDiff = floor($diff/60);
$diff -= $minsDiff*60;
$secsDiff = $diff;
return ('(elapsed time '.$daysDiff.'d '.$hrsDiff.'h '.$minsDiff.'m
'.$secsDiff.'s)');
}

View Replies !
How I Calculate Total Time Taken By A Music File Which I Uploded
can you help me about the matter.

I have to show the music file lenth(time ex. time : 2:07). I can find
it in php have any function is there to cacultae that time.

View Replies !
Monitor Total User Active Time On Your Website
Any scripts that can be easily modified for this type of facility? I need a script that stores user session time and then adds them to display the total time a user has been active on my website.

View Replies !
Last Login Time
I have been going in circles all day trying to get this to work. I have a login script that I want to be able to update the database with the last time a user logs in. The problem is it won't UPDATE the database. Code:

View Replies !
Time Login
when user login value change from 0 to 1 and again users with value 1 cant login.. any one can change this script for me?(i'm not a coder)

$check = mysql_query ("SELECT $userlevel_value FROM $table_value WHERE username='$user_value' AND password='$pass_value'"); // Query to see if user exists
#
$verify = mysql_num_rows ($check);

View Replies !
Login Time
ive made a simple cookie based log in system for my site problem being i want to give the user teh option of being logged in for 30 mins 60 mins and permanantly but i cant seem to get it right heres my code: login.php: PHP Code:

<?php

if ($_COOKIE['logedin'] == True)
{
header('Location: memberarea.php');
print("bypassing login to memberarea");
}
else
{
print("
<head>
<Title>
Member Area Login
</title>
.....

View Replies !
Last Login Time Script
I have a login script that check a DB for username and password and logs the user in. I want to add the last login time to the sript as well. I have a control panel as the first page that the user sees upon login and the other pages have alonk to return to control panel page. Everytime the users return to the control panel page the update the login time script gets execued again and overwrites the last login time info in the DB. How can I get this part to only exeute once during this seeesion the user is logged in.
PHP Code:

<?php
session_start();

if ((!$username) && (!$password)) {
header("Location: /npi/index.php?error=5");
exit;
}elseif(!$username) {
header("Location: /npi/index.php?error=3");
exit;
}elseif (!$password) {
header("Location: /npi/index.php?error=4");.....................

View Replies !
Time Since Login Script
I am working on a script and I need it to show the time in the format of say

Last Login 2hrs, or 24hrs or 2 days and 3 hrs.

I think you get the point. however I am having a hard time finding an effective way of doing so. I have tried a few different things but all seem to fail. If anyone has any help at all with this please lend a hand.

View Replies !
Validating Time On Expired Login
I have decided to use shell script (cron job) on my server to check passwords. This was pretty straight forward. Here's the objective

1. User purchases a course online.

2. After credit card is approved, a silent post is sent
to a php file on my server that captures user name,
generate password, and insert CourseDate in
DateTime data type format. This works fine.

Problem:

We will have scheduled class dates twice a month. Some users
will register early, some will register right before the class starts.
I am experiencing a problem with setting the appropriate if then statements to verify expired passwords.

The MySQL database contains a FirstName, LastName, Password, CourseDate (DateTime Format), and a TimeStamp field.

When the cron file runs in the morning, I need the script to verify any passwords that are 24 hours older than the CourseDate. I have encounter problems because users pay for the course at different times. If I set a conditional to compare the TimeStamp with the CourseDate, the script will delete passwords before they are used. (earlier registration users).

View Replies !
Count User Login Time
I want pick time after 2 min when an user login the web site also this information will be store in database automatically. How it is possible in php without help of javaScript.

View Replies !
Storing An MD5 Hash Of The Login Time In The Session
I am half way through making a site you can only do certain stuff if logged
in to.

So far, you are logged in if there is a session variable with your username,
but I got thinking that presumably someone who worked this out could make a
cookie file with this info in and pretend to be another user. So... what's
the recommended way?

I thought of storing an MD5 hash of the login time in the session and in the
database too, then on each page, comparing the session variable to that in
the db. Theory being, if a hacker had tried making their own cookie file
they wouldnt have the right hash.

View Replies !
How To Maintain A Time Of Login For Individual User?
I have one question, We can maintain login time and logout time in php.

I have done it using the get date and time while the user is loging in AND get the time when the user logout THEN take the difference between them and stored it in database,

IF the user doesn't logged out properly (ex, without logout just close the browser) . In this situation how to calculate the time difference between login and logout?

View Replies !
Login Problem - Can't Login(login Is Done In Index.php)
This is origially PMsys, I have edited it, and here is what I have done with the original
replace all $_COOKIE into $_SESSION changed all setcookie() into session_start() and defined those $_SESSION now the problem is I can't login(login is done in index.php), does anyone here got an idea why? I uploaded the whole pakage, but I think you only need to look at index.php and include/global.php.

View Replies !
Total
I have a database table with many entrys, is there a quick way of adding how many entrys there is?

View Replies !
Total ?
I have a table (sales) with 3 columns(id,name,price) the price column is integer,

id = 1
name = Car
price = 10000

id = 2
name = Car 2
price = 15000

I want to calculate the (price) columns in which the total = 25000?

View Replies !
Total Nub
I heard that I'm supposed to set up a database and I can either create it myself with strings of PHP or something like that or I can download something that I'd log into. Now someone point me in the right direction so I can get on my way with learning PHP.

View Replies !
Session Problem - Login Screen Continually Reloads After Pressing The Login Button
I am trying to get sessions to work on a log in screen to give certain
users access to certain pages/directories. The problem is that when
the login button is pushed (or the enter key pressed) the login screen
redraws, never loading the next page. I don't get any error messages.
I am using FreeBSD-5.1/Apache-2.0.46/MySQL-4.1.0.1/PHP-4.4.3.4

I have pasted the code below:

View Replies !
Login Lgout And Login Without Closing Session Gives Redirection Error
I am stepping through a text book that sets up different websites. The
one I am testing is user registration.

I set up the scripts and this is what I observe:

Login (verifying against a mysql db) - no problem.
Logout - no problem.

Close the browser and try again - no problem.

Login > Logout > Login WITHOUT closing browser I get:

An error occurred while loading http://login.php when it should redirect
me to http://localhost/index.php.

I read somewhere on the news group that the
header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname
($_SERVER['PHP_SELF']) . "/index.php") (in my example code) is called
once and so the error?

The logout.php destroys the $_SESSION variables, session itself and any
cookies so I thought it would be "like new" the second time around?

It appears to be linked to sessions but don't know enough to know how to
correct.

View Replies !
Login Script Doesn't Display If The Login Is Correct Or Incorrect.
Below is the script I am using for my login page. It doesn't display if the login is correct or incorrect. All it does is clear the username and password box when I hit submit. I want it to display an error message if the login is incorrect and if it is correct redirect them to their own web page. I am putting the MySQL connection script in the header of the login.html is this wrong? Can someone please give me some pointers on how to get this script working?

<?php session_start();
$username = $_POST['username'];
$userpass = md5($_POST['password']);
$sql = "select * from usertable where username='$username' and password='$userpass'";
$result = mysql_query($sql);
if (mysql_num_rows($result)!= 1) {
$error = "Login failed";
} else {
$row = mysql_fetch_array($result);
$_SESSION['username'] = "$username";
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
header("Location: h*tp://www.w-------.com/$row['USLP']");
}
?>

View Replies !
How To Write A Simple Login Code For Users To Be Able To Login To My Site.
does anybody know how to write a simple login code for users to be able to login to my site.

View Replies !
Max Execution Time Means Server Execution Time Or Client Browser Hung Up Time?
The max execution time is set up to be 30.

When I submit the requests of execution through the client browser, it shows the execution was running. It still hung up there after 30 seconds, after 2 minutes ...

And the browser hung there forever.

I have another page which saves the reports of the execution, so I open another browser window, and check out the report. It shows me the execution is still going even after 1 minute, 2 minutes... Code:

View Replies !
Adding Row Total Value
I have a database with a table called monthlypayment.. 2 fields in that are id, and monthlypayment I need to add monthlypayment for a sum for each id. Id is linked with other tables on the database as well (cars). so if I brought up the monthly payments for car id 12, I need to show all entries, and at the bottom, I need to add them together. "It's right at the end of my fingertips.(haha)" I know this is simple, but I'm drawing a blank.

View Replies !
Total Without And With A Condition
How do I get the total without a condition and the total with the
condition at the same time?

This is my mysql table:

id datetimeconfirmed customerid amount
1 2007-08-14 06:19:03 1 12.25
2 2007-08-06 06:19:19 1 15
3 2007-08-02 06:19:41 2 5
4 2007-08-07 06:19:58 2 7.25
5 2007-08-09 06:36:41 3 25

If I run this query:

select customerid, sum(amount) from test
group by customerid

I get this result:

customerid sum( amount )
1 27.25
2 12.25
3 25

If I run this query:

select customerid, sum(amount) from test
where datetimeconfirmed < &#55614;&#57159;-08-08'
group by customerid

I get this result:

customerid sum( amount )
1 15
2 12.25

Which query do I have to run to get this result?

customerid sum( amount ) total
1 15 27.25
2 12.25 12.25
3 NULL 25

View Replies !
Total Names
I'm need of a mysql query which needs to get the total no. of names in a particular month.

View Replies !
How To Sum A Total Of Amount Using PHP.
how to sum a total of amount using PHP. the data get from the MySQL database. Code:

View Replies !
Running Total
I would like to keep a running total of miles used on a truck. The user will be allowed to enter the total miles on the truck after every use but I want to be able to keep the total miles updating after every user submits their total how would I go about doing this.

View Replies !
Keeping Total
I have a loop that runs through the reults of a query and it does
$tot_feet += $feet(which keeps a running total).

For some reason it will not process 110 rows of data so I had to break it down into three seperate queries with three seperate loops.

I am wanting to keep a sum of all the loops. Im programming I would just create a global variable and use it but how would I do it in php? Since $tot_feet is withing the loop the value cannot be accessed outside the loop due to scope.

View Replies !
Total Value Of Database
Here's my code PHP Code:

$query = "SELECT countries, sum(count) FROM statistics GROUP BY countries";
$result = mysql_query($query) or die(mysql_error());
$num_results = mysql_num_rows($result);

while ($row=mysql_num_rows($result))
{
echo '<p>Total Number of Participants: '.$row['sum'].'</p>'
}

View Replies !
Getting Total Days.
We have a notice form which allows people to tell us if they're going to be for a long time, containing the start day/month/year and end day/month/year. Code:

View Replies !
Total Records
I think maybe I just need a fresh pair of eyes to look at this, this seems like it should be an easy fix, but I can get my head to think about it. PHP Code:

$query1 = "SELECT COUNT(*) as Num FROM COONRAPIDSRECOMMEND WHERE CLOSEDATE > &#55614;&#57156;-01-01'";   
                          if($selectmake ==&#391;'){
                          $query1.=" AND MAKE IN ("".$selectedmakestr."")";
                          }
                          if($selectmodel ==&#391;'){
                          $query1.=" AND MODEL IN ("".$selectedmodelstr."")";
                          }
                          if($selectyear ==&#391;'){
                          $query1.=" AND YEAR IN ("".$selectedyearstr."")";
                          }
                          if($selectcity ==&#391;'){
                          $query1.=" AND CITY IN ("".$selectedcitystr."")";
                          }
                          if($selectstate ==&#391;'){
                          $query1.=" AND STATE IN ("".$selectedstatestr."")";

View Replies !
Total Queries
Say if I have a page that has 5 queries on it, is there a way to calculate that without having to manually write "This page used 5 queries". A way that if I added a 6th query it would automatically update?

View Replies !
Session Based Login Script Re Login Problem
I have built this login script, it logs u in and shows the first page... i have built it to be require()'ed, when i have required it from a browser script i made it loads the front page, then when i ask for browser.php?edit=file.html

It then asks me to re login and takes me back to the front page! PHP Code:

View Replies !
Create A Separate Page With One Login That Let's Me Login To All Of The Sripts At Once?
I'm building a website using various php scripts from I found on hotscripts. Because I'm not much of a programmer myself I'm using a separate script for the blog, another one for the links section and a different one for the gallery and so on. The downside to this is that I have to login on a separate page to update the gallery and another page to update the blog and so on.

Is there a simple way to either remove the need for a login for all the scripts and just create a separate page with one login that let's me login to all of the sripts at once?
Or if there's a script that can kinda save the passwords and logs in for me?

View Replies !
Secure Place To Store Login Info And How To Login With It
I had an idea to store my login code: ftp_login... in a separate file outside of the public_html dir and set full permission (777) to it.

1. Is that safe?

2. How do I call this function from inside another file?

function Login()
{
$connection= ftp_connect('ftp.me.com');
return ftp_login($connection, "me", "pass");
}

I was hoping to return connection but I don't know how to send pointers in php.

View Replies !
How To Develop A Login System That I Can Configure For 3 Or 5 Login Attempts?
This may have been asked before but I would like to learn how to develop a login system that I can configure for 3 or 5 login attempts.

Is there anyone that knows what I mean? as I am sure that it's a counter thing that I need to do but really not sure where to start. Code:

View Replies !
Getting Total Number Of Entries
Hello, Im trying to retrieve and echo the total amount of cars in the database with PHP Code:

View Replies !
Calculate Total Of A Column
I have a column in mysql called price, and I would like to total the toal value of all items in that column, how do I do that?

View Replies !
CALCULATING Row Values To Get A Total
My problem is,, that i have a PHP script that displays a table

the table has the following colums

firstname,surname,boots,hospital,woolworths,br,other, total

the firstname and surname are grabbed from the database when the page loads, what i want is for the user to enter values in the boxes under the colums boots,woolworths,hospital etc

then when they click submit,the page is refreshed, data submited into the database, bu them redisplayed in the table the values are calucated and each user is then given a total number of hours worked at those places.

im really stuck guys, havent a clue how to go about this.

so an example would be

F S boots Hospital woolworths other total
JOE BLOGS 0.8 0.8 0.8 0.8
HELP me 0.1 0.5 0.5 0.5

submit is pressed, data entered into the database, then page redisplayed with the total column totaled up.

F S boots Hospital woolworths other total
JOE BLOGS 0.8 0.8 0.8 0.8 3.2
HELP me 0.1 0.5 0.5 0.5 1.6

View Replies !
SUM Of Array - Total Of All Values
I have an array filled with data. I need to sum it's value.

example: $key1=>10, $key2=>15, $key3=>5

I want the total of all values which should be: 30

View Replies !
Total Cookie Reset
Why is all the cookie being reset when I tell it not to reset the item named sessionhash and userid. PHP Code:

View Replies !
Total Result Php Mysql
PHP Mysql
limit the result to 5
I can display the 5 results using a do & while which it ok.

I want to list the total or all the results without using a do or while

this is so I can combine the results and remove duplicate words from the
total results

I.E.
Do & While
row result
1 this is the top
2 this is the bottom
3 this is the middle
4 this is the end
5 this is the finish

This is what I want to do:
result
this is the top this is the bottom this is the middle this is the end this
is the finish

modified result::
this is the top bottom middle end finish

View Replies !
Counting Total Kb In Directory
im trying to create a script that allow me to see how much space has been used by a certain directory and to calculate this in Kb (kilobytes) or Mb (megabytes), i have search the forum and the web....but can't find anything really upto the job.

View Replies !
Count The Total Number Of MB Being Used
I`m building a small control panel for one of my sites and what I wanted to do was count the total number of MB being used, is it even possible in PHP and if so what would be the best method?

View Replies !
Pagintion Page Of 15+ Total
I have a pagintion page of 15+ total...now I dont to want display all the page numbers. I want something like: Pages: 1 2 3 4 5 ... 12 13 14 15 How would I do this in a for loop?

View Replies !
Finding Cart Total
I have a question concerning my cart total. I need to get the total I have my products and cart in two separate tables: products and cart.

In my cart table, I have stored the productid to tie it to the products table, userid from the session variable to tie the products in the cart together, and quantity. In my products table I have the price for the product. 

What would be a formula I could write to get the complete total dynamically? Because I could have one product up to 20. If you need more info, let me know.

I thought about calculating the individual totals and then adding them, but I don't know how to do that.

View Replies !
Get A Total Count Of All Items
I am having a looping issue, when i execute this code I get a total count of all items at the end of each echo.. Code:

View Replies !
Total Table Columns
I have a report that pulls data from a mysql table and generates a html table with the data. I need to sum up the columns into 2 separate  fields  I think I need to access the result from the query but do not know how. Code:

View Replies !
Count Total Iteration
I got stuck trying to count total iterations for two loops. My code is as follows:

for($i=1; $i<10; $i++){
echo $i;
for($j=1; $j<5; $j++){
echo $j;
}
}
it's gonna produce results as follows:
1 - 1,2,3,4
2 - 1,2,3,4
etc..

How to make this script output:
1,2,3,4,5,6,7..35,36?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved