<?php
    session_start();
    if (!isset($_SESSION['username'])) {
        $_SESSION['login_msg'] = "Please login first to continue.";
        header("Location: login.php");
        exit();
    }
    require_once("./include/config.php"); 
    include('include/header.php');  
    
    $sql="SELECT * FROM user_registration";
    $result = $conn->query($sql);
    
    
    $companyaddress="";
    
    while($rows = $result->fetch_assoc()) {
        $companyaddress .= "
                            <div class='col-md-6 mb-4'>
                                <div class='card overviwe-card' style='min-height: 20rem;'>
                                    <div class='card-body'>
                                        <div class='row'>
                                            <div class='col-md-12 mb-3'>
                                                <h5 class='mb-2 title2'>Company Address</h5>
                                                <!--<small class='small-b'>Please fill the following forms to complete your Profile.</small>-->
                                            </div>
                                            <div class='col-md-12'>
                                                <table class='table' style='max-height: 18rem; overflow-y: auto;'>
                                                    <tbody>
                                                        <tr>
                                                            <th scope='row'>Address:</th>
                                                            <td>". $rows['address']."</td>
                                                        </tr>
                                                        <tr>
                                                            <th  scope='row'>Country:</th>
                                                            <td>". $rows['country']."</td>
                                                        </tr>
                                                        <tr>
                                                            <th scope='row'>State:</th>
                                                            <td>". $rows['state']."</td>
                                                        </tr>
                                                        <tr>
                                                            <th scope='row'>City:</th>
                                                            <td>". $rows['city']."</td>
                                                        </tr>
                                                        <tr>
                                                            <th scope='row'>Pincode:</th>
                                                            <td>". $rows['pincode']."</td>
                                                        </tr>
                                                    </tbody>
                                                </table>  
                                            </div>
                                        </div>  
                                    </div>
                                </div>
                            </div>     
                            ";
    }
    
     
    include_once('company-address1.html');   
    include('include/footer.php');         
?>    