473,378 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Count time upto click submit in the same page

19
Dear Brothers / Xperts,

I need to count time of a page upto click submit. When the user just enter the page the timer / start time is tracked . When the user submit the form then the end time is need to be measured.

The calculated time ($end - $start) is need to keep in a php variable and after then the form will be submitted.

I am trying to do this work using the below php technique...[php]$start = microtime(true);
.
. // My code goes here.
.
$end = microtime(true);
echo 'Total script execution time: ', ($end - $start), '.';[/php]How can I process the end time (when user click the submit button)?
May 4 '08 #1
1 1981
hsriat
1,654 Expert 1GB
Use $_SERVER['REQUEST_TIME'] or gettimeofday() to find the current time in both cases.
Use session to store $start.

Anything else?

PS: But that shouldn't be called "Total script execution time" as you have written.
Script execution time is the time taken by a script to get executed.
May 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Pete | last post by:
There is a Summary/Example further down... On page one of my site I have a form with some checkboxes and detailed descriptions. When the form is submitted (to page two), the values of the...
4
by: Pete | last post by:
Okay, I'm still stuck with this problem. Here's a quick recap/summary :- 1. Page 1:User checks 3 out of 10 checkboxes and submits form to page 2 2. Page 2:Item count shows 3 items. User checks...
1
by: Chris Nelder | last post by:
I think I must be losing my mind here. I've got the same page running on two different machines. I do the same form post on both, and on one machine I get Request.Form.Count=21 and on the other...
6
by: JSjones | last post by:
Hi all, I'm new to these boards and my javascript experience is fairly limited and basic so please bear with me. Anyway, on to the question and some background. I'm developing using ColdFusion...
6
by: charlie_M | last post by:
I figured out via various help from this forum... EXAMPLE: onClick="document.forms.MYBUTTON.value='SIMPLE';document.forms.submit()" In my CGI I see "MYBUTTON" = "SIMPLE" and this works...
8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
1
by: mark | last post by:
Hi I am trying to count the number of times a page loads. When I hit the submit button I can get the page to count once using ispostback to check . I am trying to incriment a variable everytime...
0
by: comp.lang.php | last post by:
I have a form that when you click the "Generate Report" submit button, it will force download a CSV file, required for this project. On the very same page you also have a "Search" submit button,...
2
parshupooja
by: parshupooja | last post by:
Hello , I am using asp.net C# SQL Server . I have form on asp.net page consists various fields. field 1, field 2 ------ upto field 10 on click of submit button i need to save all information...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.