Answers for "display name from the my database"

0

display name from the my database

<?php
if (isset($_SESSION['userId'])) {
    require './includes/dbh.inc.php';
    $result = mysqli_query($conn,"SELECT * FROM users");
    if ($result->num_rows > 0) {
        // output data of each row
        while($row = $result->fetch_assoc()) {
            echo "<li class='login current2'><a href='login.php'>". $row['fnidusers'] . $row['lnidusers'] ."</a></li>";
        }
    }
}
else {
    echo "<li class='login current2'><a href='login.php'>Login / Sign up</a></li>";
}
?>
Posted by: Guest on May-02-2022
0

display name from the my database

<!-- logged in user information -->
    <?php  if (isset($_SESSION['namapengguna'])) : ?>
        <p style="margin-left:360px;margin-right:60px">Welcome<strong><?php echo $_SESSION['namapengguna'];  ?></strong></p>
    <?php endif ?>
Posted by: Guest on May-02-2022

Code answers related to "display name from the my database"

Browse Popular Code Answers by Language