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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
|