so I'm making this deal website. On the index page of the deal website, there would be multiple deals listed and each deal has it's own end date.
Now, I'm using this jQuery script for the clock countdown.
<script>
$(function () {
var austDay = new Date();
austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
$('#defaultCountdown').countdown({until: austDay});
$('#year').text(austDay.getFullYear());
});
</script>
This is the database structure
Product ID ProductName End Date
(auto_increment) (VARCHAR) DATE
Now, I guess I would have to put the above jQuery script within a while loop (loop would go through the products, and display their details) to show the clock for each deal.
How would I pass a product id (for example let's say the productid is in the $productid variable) in jQuery, so that I can do a mysql query from there to get the end date..and then the clock displays the correct time for each deal.
Any suggestions are welcome.