Jump to content

Archived

This topic is now archived and is closed to further replies.

aleman84

a real problem with counting down!!!! need help big time!!!!

Recommended Posts

Right from the start, I need a script that counts up to 45 minutes and every 1 minute it goes a function. what function is not the issue just a general function. It also needs to display the minutes and seconds for the user to see. This needs to auto update and the time needs to be based on server time not client side.

I know its alot to ask but does any one know how to do this as its so very important!!!!

Need help from the best php guys on the net!!!!


lol I am so in need of help lol.

Cheers.

Share this post


Link to post
Share on other sites
You cannot have a php script countdown. You will need to use a combination of javascript and php and some ajax implimentation.

Ever looked at Ajax? [a href=\"http://marc.theaimsgroup.com/?l=php-general&m=112198633625636&w=2\" target=\"_blank\"]here[/a] is a quick introduction.

Share this post


Link to post
Share on other sites
oh, oh, oh! now I thought this might be simple ah! ok, well im new to AJAX! this is a whole new area for me. What I am looking to do is that possible after learning a little AJAX? or will I have to get into it big time?


Thank you for the fast response!

Share this post


Link to post
Share on other sites
Sounds pretty simple to me. You'd just need to setup a javascript timer that requests your php function every minute for 45 minutes while displaying the time to your client.

Ajax is a set of theories more than a technoligy, dont let it get to you.

Share this post


Link to post
Share on other sites
Truely a master of PHP and all things scripting. Thank you for your help!


Now all I need is for you to write the script for me! Just joking unless you want to lol!

cheers for the guidance.

Share this post


Link to post
Share on other sites
HI

This may help you out a little but it will count down
removing the echo "<br />" it will count accross

sleep is set at 1 second make this 60 per minute

[code]for( $i=0;$i<45;$i++){
    echo $i;
    echo "<br />";
    ob_flush ();
    flush();
    sleep(1);
    
}[/code]

it will not refresh to count up in one letter characters

cheers

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.