Database failed

My Db File

<?php $localhost = "sql201.epizy.com"; $username = "username not show in here"; $password = "Password not show on here"; $dbname = "epiz_25177180_Php_Network"; $db = mysqli_connect("sql201.epizy.com","username not show on here","Password not show on here","epiz_25177180_Php_Network"); if(!$db){ die("DATABASE FAILED".mysqli_error($db)); } ?>

My Index file:-

<?php include('db.php'); ?> <?php include('insert.php'); ?> Php network
<div class="container">
    <div class="row">
        <div class="col-lg-12">
            <form action="insert.php" method="POST">
                <div class="form-group">
                    <label for="formGroupExampleInput">Enter Url</label>
                    <input type="text" class="form-control" id="formGroupExampleInput" placeholder="Enter url" name="enter_Url" required>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary" name="submit">See result</button>
                </div>
            </form>
        </div>
        
        <div class="col-lg-12">
            <table class="table">
               
                <thead>
                    <tr>
                        <th scope="col">Id</th>
                        <th scope="col">Result</th>
                    </tr>
                </thead>
                
                <tbody>
                 <?php /*SELECT DISPLAY DATA*/
                    
                    $Select_Query = "SELECT  *  FROM show_data";
                    $run_query = mysqli_query($db,$Select_Query);
                    while($row = mysqli_fetch_assoc($run_query)){
                        $Id = $row['Id'];
                        $enter_Url = $row['enter_Url'];
                        echo "<tr>
                               <td>$Id</td>
                               <td>$enter_Url</td>
                              </tr>";
                        }
                    
                  ?>
                    
                </tbody>                  
            </table>
        </div>
        
          
     </div>

<script src="js/bootstrap.js"></script>

Someone help me connect to database
my subdomain name
http://phpnetwork.my-style.in/?i=1

3 Likes