Hi all

This is just a query and would like to know how i would go about creating a java countdown that would countdown from a date in my database and when it gets to zero it would disable the submit button.

I currently have a java countdown working however this isnt counting down from a date from the database.

Any help pointing me in the right direction would be great.

Thanks

Hi,
You can replace the value for time in the JavaScript with the value selected from database, if that script is in ".php" file.

For example:

var jsvariable = <?php
// here select data from database

echo $date_time_from_db;
?>;

Then, the js script will count down from that value;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.