Forum Moderators: coopster

Message Too Old, No Replies

Calendar / Time / Count Down timer help

         

impact

1:57 am on Aug 9, 2010 (gmt 0)

10+ Year Member



Hello,

I have a user group account on my site. I am trying to make a "busy" option in it where in, members can state when they are busy and when the are free.

To implement that, I found a calendar tutorial [mattkruse.com ]

Due to my limited knowledge in programing & MYSQL, I am not able to figure out how do I calculate the remaining time. I would also like to show visitor Count Down to "Busy time" to let visitors know how much time they have if they wish to see this person.

Any help will be appreciated.

Thanks.

morehawes

9:58 am on Aug 9, 2010 (gmt 0)

10+ Year Member



There are lots of useful tools in PHP for handling dates. I see what you are trying to achieve can be broken down into the following steps :

  • User selects date using Javascript plugin and submits form (Useful link : [tizag.com ])
  • The receiving PHP script gets this text representation of the date and produces a time stamp (Useful link : [uk3.php.net ] but there are many PHP date/time functions)
  • PHP inserts this time stamp into your database (Useful link : [w3schools.com ])
  • A visitor loads the page, your PHP script retrieves the time stamp from the database and subtracts this from the current time stamp giving you a number of seconds which is the remaining time (Usefule link : [uk3.php.net ])

Maybe see how far you get and post again if you run into problems.

Good luck :)

dorwat

9:36 am on Aug 10, 2010 (gmt 0)

10+ Year Member



To morehawes: Thanks for the link postings. I'm new at this stuff myself and your links will be very helpful as I continue my self education.

morehawes

9:50 am on Aug 10, 2010 (gmt 0)

10+ Year Member



You are welcome dorwat - I know what it's like starting out and sometimes if someone breaks things down and gives you a nudge in the right direction it can be a big help! Divide and Conquer :0)

Good luck!