jeudi 27 février 2020

how to disable and enable button with condition

i have a button and i want it to be active only if 'status' table in the database is accepted otherwise to be disabled this is the code i tried please help

        <input type="submit" class="btn btn-primary" name="nw_check" value="time in" <?php
$uname= $_SESSION['uName'];

 <div class="col-md-5">

        <input type="submit" class="btn btn-primary" name="nw_check" value="time in" <?php
$uname= $_SESSION['uName'];

$query="select * from optime where user_no='$uname'";

$Result=mysqli_query($connection,$query); $row = mysqli_fetch_array($Result);

if(isset($row['status'] )=='pending') && ($row['status']) == 'rejected'{ ?> disable >

        </div>

Aucun commentaire:

Enregistrer un commentaire