icpeanuts Posted November 10, 2007 Share Posted November 10, 2007 Hi, I am new to php. I am learning how to program using php. I am doing a project now. I want to use php to create an ON/OFF switch/button. The default of the button is OFF. If you push the button, the switch will be ON. To the right of it will display in seconds how long it is been on. Once I click on the button again, it will STOP. The timer will display. Almost like a stop watch. Can someone teach me how to program this using php? Detail would be great, I am very new to PHP. Thanks Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted November 10, 2007 Share Posted November 10, 2007 This would be very slow and innacturate depending on your browser speed. Try the AJAX (javascript) Forums! Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted November 10, 2007 Share Posted November 10, 2007 Things that count, or tick, or whatever, are done with language that runs INSIDE the browser. PHP does not, it only processes at the server level. It does one pass over the code fed to it, then goes back to sleep. Therefore, as mentioned, javascripting is used for this stuff... PhREEEk Quote Link to comment Share on other sites More sharing options...
icpeanuts Posted November 11, 2007 Author Share Posted November 11, 2007 Thank you so much for redirecting me to the right thing. Oh man. I am just getting started with php, now I have to start javascript. man oh man.. Thanks for the info. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.