jquery - PHP - countdown timer from mysql value -
i developing auction website.
auction_end_time stored in mysql.
i want fetch auction_end_time without refresh in case of update, have used jquery load() method.
now want make countdown timer of auction_end_time.
following below scripts have written:
html
<td>time remaining: <span id="time_remain"></span></td> jquery
$(document).ready(function(){ var id=<?php echo $id; ?> setinterval(function(){ $("#time_remain").load("test.php",{id:id}) },1000); }); test.php
<?php $query="select custom_end_time event_dates event_details_id=".$_post["id"]; $result=mysqli_query($dbcon,$query); $row=mysqli_fetch_array($result); echo $row["custom_end_time"]; ?> i have auction_end_time mysql , updated database without refresh.
i want countdown of auction_date_time if value of auction_date_time updated in mysql countdown starts updated value.
Comments
Post a Comment