Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
735 B
1
Indexable
Never
<?php
// Assuming $con is your database connection and $_SESSION['id'] contains the user's ID

// Please ensure to sanitize user inputs to prevent SQL injection attacks

$sq13 = "SELECT * FROM tbl_scholar WHERE users_id='".$_SESSION['id']."'";
$result = mysqli_query($con, $sq13);

if ($result) { // Changed $result to check the query result $result instead of $result3
    ?>
    <input type="submit" class="btn btn-primary ms-2" value="Submit Scholarship Document" data-bs-toggle="modal" data-bs-target="#exampleModal" disabled>
    <?php
} else {
    ?>
    <input type="submit" class="btn btn-primary ms-2" value="Submit Scholarship Document" data-bs-toggle="modal" data-bs-target="#exampleModal">
    <?php
}
?>
Leave a Comment