如何在php中设置结果限制

时间:2018-02-15 14:34:03

标签: php

我希望在发放疫苗方面有3个限制,但我不知道该怎么做。

这是我的代码:

$checkPatients = $conn->query("Select date from `vaccine` where itr_no = $_GET[id] ORDER by date DESC  limit 1 ");
$fetchPatients = $checkPatients->fetch_array();
if(date('m/d/Y', strtotime($fetchPatients['date'])) != date('m/d/Y'))
{
    ?>
    <button class = "btn btn-primary" id = "show_com"><i class = "glyphicon glyphicon-plus">ADD</i></button>
    <br />
    <?php
}
else if(isset($_GET['result'])){
    if($_GET['result'] == 'success'){
        echo '<div class="alert alert-success" role="alert" style="font-weight: bold;">Save Successfully</div>';
    }
}
else{
    echo '<div class="alert alert-danger" role="alert" style="font-weight: bold;">
    '.ucfirst($_GET['firstname'])." ".ucfirst($_GET['lastname']). ' was already given a vaccine today. Thank you!.</div>';
}

现在,我可以发一种疫苗,但之后我已经收到了这个警报:

echo '<div class="alert alert-danger" role="alert" style="font-weight: bold;">
        '.ucfirst($_GET['firstname'])." ".ucfirst($_GET['lastname']). ' was already given a vaccine today. Thank you!.</div>'; `

我想要发生的是在接到所述警报之前我必须提供最多3种疫苗。

我不知道该怎么做。

0 个答案:

没有答案