<?php if(!$conn){ } ?>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" type="text/css" href="css/bootstrap.css" /> </head> <body> <nav class="navbar navbar-default"> <div class="container-fluid"> <a class="navbar-brand" href="https://sourcecodester.com">Sourcecodester</a> <div> </nav> <div class="col-md-3"></div> <div class="col-md-6 well"> <h3 class="text-primary">Display HTML List With MySQLi Using PHP</h3> <hr style="border-top:1px dotted #ccc;"> <div class="col-md-9"> <h3>PROGRAMMING LANGUAGES LIST</h3> <ul> <?php require'conn.php'; echo "<li>".$fetch['list']."</li>"; } ?> </ul> </div> <div class="col-md-3"> <form method="POST" action="insert.php"> <div class="form-group"> <label>Enter here..</label> <input type="text" name="list" class="form-control" required="required"/> </div> <center><button class="btn btn-primary" name="insert">Insert</button></center> </form> </div> </div> </body> </html>
<?php require_once'conn.php'; $list=$_POST['list']; } ?>