插入记录后,PHP自动计时(计时器)

时间:2019-03-19 00:36:29

标签: php html mysql timer

我有一个表格vehicle用于保存包括日志记录时间在内的详细信息。只要插入了一条新记录,我就希望“ Countdown”列开始从30分钟开始自动倒数,直到其变为零(0 )。我该怎么做? 这是表php代码

`<?php $results = mysqli_query($db, "SELECT 
 Vehicle_name,Vehicle_make,Vehicle_color,Number_plate,Date,Time FROM 
 vehicle"); ?>
 <div class="table">
<table>
<thead>
    <tr>
        <th>Vehicle name</th>
        <th>Vehicle make</th>
        <th>Vehicle color</th>
        <th>Reg Number</th>
        <th>Date</th>
        <th>Time</th>
        <th>Countdown</th>

        <th colspan="4">Action</th>
    </tr>
</thead>
<?php while ($row = mysqli_fetch_array($results)) { ?>
    <tr>
        <td><?php echo $row['Vehicle_name']; ?></td>
        <td><?php echo $row['Vehicle_make']; ?></td>
        <td><?php echo $row['Vehicle_color']; ?></td>
        <td><?php echo $row['Number_plate']; ?></td>
        <td><?php echo $row['Date']; ?></td>
        <td><?php echo $row['Time']; ?></td>
        <td><?php echo $row['Time']; ?></td>            
        <td>
            <a href="php_code.php?del=<?php echo $row['Number_plate']; ?>" 
        class="del_btn">Delete</a>
        </td>
    </tr>
<?php } ?>

`

0 个答案:

没有答案