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.





Computing The Time, Every 45 Minutes After A User-entered Time?


How would I go about computing the time, every 45 minutes after a user-entered time? for example, a user enters 05:00, I would like to see

05:45
06:30
07:15
08:00
etc

I figure it will be done using DATE, so I have tried: Code:

$s1 = $sunuptime(date('G:i')+0:45);
<tr>
<td>1st</td>
<td>' .$s1. '</td>
</tr>




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Convert User Entered Date And Time To Unix Timestamp Before Inserting To Database
How do you convert a user inputted date to a unix timestamp before
insterting it into your database? I have a form, with a textfield for
a date that the user inputs in the format mm-dd-yyyy and three dropdow
boxes for hours, minutes, and AM/PM. All of these need to be considered
together and converted to one Unix Timestamp and then inserted to the
MYSQL date field. The type of field is INT (11) so that I can instead
of the standard 0000-00-00 format of MYSQL so that I can do better
calculations and queries.

View Replies !   View Related
Format The Date And Time Entered By The User To The Mysql Format
I am trying format the date and time entered by the user to the mysql format which is: yyyy-mm-dd hh:mm:ss for example the user enters 25-8-2007 16:20:00 I want to convert it to 2007-08-25 16:20:00 and insert to the database. Code:

View Replies !   View Related
Time + 10 Minutes
$ganja=date("D dS M h:i A");

Assuming the above produced the following .

Tue 02nd Jan 11:55 PM

How do i add 10 minutes to it to produce this ? .

Wed 03rd Jan 00:05 AM

View Replies !   View Related
Convert Time To Every 5 Minutes
it's really a mathematical problem! when I get the minutes of today: PHP Code:

View Replies !   View Related
Script Will Time Out After 90 Minutes
Just moved site to different web server. Previously no problems. Now, the script will time out after 90 minutes. I've set set_time_limit(0) but no effect.

View Replies !   View Related
How Many Minutes Have Passed From A Given Time
i egt php to tell me in minutes how many minutes have passed from a given time for example i have a form that a user enters 2 times 1 when he took off and one where he landed i need php to work out how many minutes have elapsed from the take off time. currently i am useding the timespan command but i can get it to work out in minutes correctly i think. PHP Code:

$timespan =($landingtime + $takeofftime);

View Replies !   View Related
Time Comparison - Asking The User To Select The Between Time?
I have a form thats called Conference Room Booking. In that i need to asking the user to select the between time(like 5:30 to 6:30) Everything is ok. now my problem is i shud not allow the user to select the same time. for example Another user has been requseted the time between 5:30pm to 6:30pm .Now i shud not allow the following times thats
4:30 to 5:00
5:30 to 6:00
and so on.

View Replies !   View Related
Time In Hours-Minutes-Seconds (accumulated)
Time in Hours-Minutes-Seconds (accumulated)

How do I do this?

I have minutes:
$minutes_online = intval((time() - strtotime($data[$i]['dLastLogon']))/60);

Ex:
$minutes_online = 8758;

How do I show this in Hour:Minute:Second - 10:32:22

View Replies !   View Related
How To Timeout $_SESSION After 5 Minutes Of Idle Time
When I log in on my website I want to be automaticly logged out if i'm idle more than 5 minutes... I have everything working on my login... so all i need to do is to fix that idle part..

View Replies !   View Related
Converting Time To 'days, Hours:minutes'
I'm trying to 'age' files but can't seem to figure it out.

I'm getting the files modified value and doing:

> time() - $mtime;

to get back something like:

> 18699668

How do I convert this value to 'xdays, yhours:zminutes'?

View Replies !   View Related
Maximum Execution Time - Run A Script Which Will Take Several Minutes To Complete
I need to run a script which will take several minutes to complete, but the max execution time is 30 seconds and I cannot change that value. Is there some way to detect the elapsed execution time of a script, in order to suspend it automatically and prevent the timeout?

View Replies !   View Related
How Can I Make A Function That Would Test If The Time Entered By The Employee Is Valid?
I have a program that calculates log in and out of an employee...

My question is how can I make a function that would test if the time entered by the employee is valid

example:

1.) IN : 02:00:00 OUT: 03:00:00 Result: VALID
1.) IN : 22:00:00 OUT: 01:00:00 Result: VALID
1.) IN : 23:00:00 OUT: 22:00:00 Result: INVALID
1.) IN : 02:00:00 OUT: 01:00:00 Result: INVALID
1.) IN : 02:00:00 OUT: 00:00:00 Result: INVALID

View Replies !   View Related
Create A New Variable Which Is An Hour And Fifteen Minutes After The 'time' Variable.
if i have a variable 'time', and I want to create a new variable which is an hour and fifteen minutes after the 'time' variable. how do i write that?

View Replies !   View Related
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 !   View Related
First Time User
I've never sucessfully written PHP though I know several other languages.

i want to have a generic PHP page that will be used to format blownup photos, e.g. someone clicks on a photo, and it is loaded into a new page at full size and with a bgcolor and centered and the like. I don't want to have a million html pages obviously.

how do I have one page, on a link, send a variable to a php page indicating the photo name so that it can be dynamically used.

View Replies !   View Related
One User Download At A Time
i have few files which reside on a server, i have also few users who can download files from server and send files to it, in addition only one user can use specified file at a time. is it possible in PHP?

View Replies !   View Related
User Online Time
I was searching trough internet and didn't find anything useful ..

I want to do user online time counter... Like this one on phpFreaks.

Total time logged in: 180 hours and 15 minutes.

View Replies !   View Related
User Load Time
any way to get the users load time for the page for it to finish loading?

View Replies !   View Related
Update The Time The User Logged In
Im having problems with the following code, it wont update the time the user logged in, can anyone help?. tried changing mysql_num_rows to mysql_affected_rows and it still does not work. I am using a DATE/TIME format to store the login time, PHP Code:

View Replies !   View Related
Convert A User Inputed Time
What I would like to do is take a user inputed time such as:

1:30 PM

and convert it to:

13:00:00

to put into a MySQL db. but I just can't seem to figure it out.

View Replies !   View Related
Time Online User System
I'm building something special but dont really know whats the best way to start this
i want to messure time online from users that signup for it So i can make a toplist of the best visitors that where online and active But how do i messure time and how do i abort it when they are not active for a <? while ?>?

View Replies !   View Related
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 !   View Related
Track The Time A User Is On A Website
What we're to be doing is implementing a referral type program on the site. Assume the following, Person A refers Person B to the site, it's stored in the database that Person B's referrer is Person A. So then, for each second Person B is on the site, we add one point to Person A's referral points (also set in the database).

How can we track the user accurate enough (to the seconds) so that once Person B leaves the site, we know exactly when Person B closed the browser/went somewhere else, how long Person B was on the site, and simply use that info to give Person A his deserved referral points.

We have access to our php.ini file for w/e reason, we've got database access, we can basically do anything w/ php, and such. Any ideas on how to do this? My only idea at the moment was to check every 5 minutes who was active in the past 5 minutes, and clear anyone who wasn't, but that didn't seem accurate.

View Replies !   View Related
How Can I Let User To Add No Of Quantity They Want Display At The Same Time?
I am writing a shopping cart program. the flow is when customer select one product, it retrieves from database and show item description on screen and allow to enter the quantity customer want.

so i wrote a funtion to retreive data from database and another funtion to display. in the display I would like to add an input so that user can add an quantity they want. but how can I pass the value of product_id and input quantity and how do I continue to manipulate the data. Code:

View Replies !   View Related
Deduct Date/time From Daste/time To Display Hours/days Difference
what i'm wanting to do is take away date logged from date closed therefore leaving the time between the 2 date/time stamps so that i can work out the average time later on and display as average time: 1day 2hours .

View Replies !   View Related
Compute Current Time For Mountain Standard Time With Daylight Savings (MDT)
I'm trying to compute current time for mountain standard time with daylight savings (MDT);and without DST (MST), eg: Phoenix, AZ. If I use the PHP timezone "US/Mountain", it returns MDT correctly. What is the PHP time zone for MST? Similarly, are there PHP time zones for Pacific, Central and Eastern time zones without Daylight Savings? The PHP time zones US/Pacific, US/ Central and US/Eastern all show time with Daylight Savings.

View Replies !   View Related
Show Time / Date To Reflect Eastern Standard Time
my web host is located on the west coast i live on the east coast so if my page shows the date:

$day = date(d);
$mth = date(m);
$yr = date(y);
echo $day . "-" . $mth . "-" . $yr;

i shows the date as of west coast time. so the time now is 1:40am april 6, 2007 my page will still show april 5, since west coast is 3 hours back. (10:40pm apr 5) how do i compensate for this time zone difference? i want my time / date to always reflect eastern standard time.

View Replies !   View Related
Convert Query Results To Time Date/time Format
i have a query which displays the start time, end time, and also the duration. these results are displayed, however the duration doesnt seem to display in the correct format, it is displayed as numbers but not in the correct format. Code:

View Replies !   View Related
How To Calculate The Time The User Spend To The Webpage
I need a code that will calculate the time the user spend to the webpage. After specific timeline for example 1 minute, after 1 minute, the user will be redirected to login page.

View Replies !   View Related
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 !   View Related
Tracking User Time On Website During Session
I am trying to write a tracking system to record the amount of time a user is logged in and actively doing stuff on a website. Are there any articles on how to do this? I just can't think of a good way to go about this.

I was going to record the start of there session and update the current time on each page they visit and subtract the session start time from the current time but if they leave the website for an hour and come back on the same session it would update an hour.

I also tried to verify the referer to see if they came from the website in question but that doesn't work because the referer isn't always set. Any ideas on how to go about this in the most accurate way?

View Replies !   View Related
Problems With Php Date/time - Real Time Clock
On my website i would like to have a real time clock....i mean to show seconds
running one after another...how can i do this?

Another problem is how to get time into a variable (which then i will insert
into a database table)?

View Replies !   View Related
Adjusting Time Displays For User's Local Time
I have a news/comment site where stories and comments are accompanied by the date they were posted. Currently I'm doing that in the GMT format, simply because it's easiest.

What I'd like to do, however, is have the page display posts and comments with "your time," i.e., the local time of the user (example of what I'm talking about here).

I know how to get local time variables from a user with javascript, but I'm not sure how to pass that information to PHP, especially since I'd like to do this on the front page, which means no passing javascript information via query strings.

View Replies !   View Related
Make The Time() Function Display The Current Time In GMT?
how do I make the time() function display the current time in GMT?

View Replies !   View Related
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 !   View Related
Change Timezone From Pacific Time To Eastern Time
My host recently moved their servers to Los Angeles, so now all the new posts to the database are in Pacific time.. How can I convert a DATETIME field from the database to display in Eastern Time? Code:

View Replies !   View Related
Makes A User To Log Out Automatically If The User Is Inactive For 30 Minutes
im making an web-based game and im trying to make a code that makes a user to log out automatically if the user is inactive for 30 minutes, but im totally stuck on doing it.

And im also trying to make a countdown script. Example: The user is buying an item, the delivery of the item takes 2 minutes. 2 minutes later the user have the item. How do i make that in the MySQL table, and continue ticking even if the user is not logged in?

View Replies !   View Related
User Local Time Diplay In Input Field
I'm wondering how can I have the local time of a user into a input field, it might sound or be stupid but even after my search I couldn't find a code si9mple enough, without any bla bla which each not my need.

View Replies !   View Related
Record The Date And Time When The User Enters A Page
I have a situation where I need to record the date and time when the user enters a page. And I need to store in an MySQL table later, the stored date and time (when user entered the page) and the date and time of inserting the record (meaning execution of query).

However, the two dates and times are always equal. Is there anyway I can store the original entry time of the user either thru PHP or Javascript?

View Replies !   View Related
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 !   View Related
User Local Time Display In Input Field
how can I have the local time of a user into a input field, it might sound or be stupid but even after my search I couldn't find a code si9mple enough, without any bla bla which each not my need.

View Replies !   View Related
Use Cookies To Save Info On What The User Enter Last Time In A Input?
I am having some trouble looking for a good tutorial on cookies and how to have them save what you last time entered in the form. So how can I do this so users don't have to renter everything the next time they try to post something on my site?

View Replies !   View Related
Time System Report On Delinquent Time
Going Nuts with this array.
My goal is to have a time system report on delinquent time that looks like
this.

Tom Doe
Tom@workplace.com.

Entered: 0
Hour(s) on: 2005-02-02

Entered: 0
Hour(s) on: 2005-02-01

*****************

Jane Doe
jane@workplace.com.

Entered: 0
Hour(s) on: 2005-02-02

Entered: 0
Hour(s) on: 2005-02-03
[color=blue][color=green][color=darkred]
>>>>>>>>>>>>>>>>>>>>>>[/color][/color][/color]

What I'm getting is this

Jane@workplace.com.
You have entered insufficient time on:
Employee: Jane Doe
Entered: 0
Hour(s) on: 2005-02-01

Tom@workplace.com.
You have entered insufficient time on:
Employee: Tom Doe
Entered: 0
Hour(s) on: 2005-02-01

Harry@workplace.com.
You have entered insufficient time on:
Employee: Harry Doe
Entered: 0
Hour(s) on: 2005-02-02

Jane@workplace.com.
You have entered insufficient time on:
Employee: Jane Doe
Entered: 0
Hour(s) on: 2005-02-02

View Replies !   View Related
Determining If Time Falls Into Time Frame
I am having problems determining whether the current time falls into a certain time frame. I want to be able to allow my users to set a start and end time of when they do not want to be disturbed.

for example: between 11pm and 3am every day. I would then store this as 23:00:00 and 03:00:00 in a table. If the times were on the same day then this code would work:
PHP Code:

View Replies !   View Related
Formate Date And Time To Time Stamp
How can I transform the out put of a date() function into a timestamp e.g date(H:i:s)

View Replies !   View Related
Convertint Time String To Time Stamp
I want to convert the time string from the if-modified-since header
into a unix time stamp, so I looked at the strtotime() function. The
PHP manual on that function makes reference to a GNU manual page,

which indicates that only UTC and Z are unambiguous. However, a
last-modified-header is followed by "GMT". They are synonymous, but
can I safely use it with strtotime()?

View Replies !   View Related
How To Set Now() To Return Eastern Time Instead Of Pacific Time?
I was wondering if you guys know how to set now() to eastern time to pacific time. My server is currently set to Pacific time, and I need to retrieve eastern time.

View Replies !   View Related
Time Conversion - Find Exact Time
I am having problem in converting time. I have "1196242839" and I want to convert it to find exact time. I tired "strptime()" but get error.

View Replies !   View Related
Calculating Time - Get Time From A Video Game
When I get time from a video game it has the time syntax like 0D 0H 0M and it can hold data up to 23D 23H 59M. So how would I take that type of syntax and take only the H and M time variables and put it into a database called Minutes & Hours.

Dont worry about the Day datatype because no-one will spend 1 day in a game unless thier idleing which would be cheating. So take 0D 14H 42M and put it in 2 colums in a database the one bing Hours And THe Other Being minutes. I think theres an explode and implode statements in ther but I have no idea on how to do it.

View Replies !   View Related
How Do You Do A Time Comparison Against A Time Stamp In The Database?
How do you do a time comparison against a time stamp in the database: $Started = ['Started'];
And a time representing now : $Date = date("Y-m-d H:i:s",time()); But i wanted the difference from now to the start to be given back in minutes only.

View Replies !   View Related
Arrange Posts By Time The Time Is Stored
I have a databse called phpb1 (The forums- obviously!) I use the below simple code to retreive posts:

mysql_select_db(npsari_phpb1);

$q = "SELECT * FROM
phpbb_posts_text
ORDER BY ???? DESC
LIMIT 100;";
$res = @mysql_query($q);

I want to arrange posts by Time The Time is stored in another Table How can I connect between two tables?

View Replies !   View Related
Subtract Time From The Current Server Time
i have a time that i will get from a mysql database (so it will be in mysql format, YYYY/MM/DD HH:MM:SS). what i would like to do is subtract this time from the current server time in order to get the difference between the two times, expressed as 'x days, x hours, x minutes and x seconds'. any pointers or tips on how to do this .

View Replies !   View Related

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