I am having an issue where I insert the record and it gets inserted also email part works but when confirmation page shows it only shows last record in the array 3 times. I figured putting it in for loop well show all the records. I am not sure what I am doing wrong will keep figuring out the issue.
process_insert.php
<html>
    <head>
    <title></title>
    </head>
    <body>
    <?php
        ini_set('display_errors', 1);
    error_reporting(~0);
    $serverName = "localhost";
    $userName = "root";
    $userPassword = "";
    $dbName = "blog_samples";
    $conn = mysqli_connect($serverName,$userName,$userPassword,$dbName);
    $rows_count = count($_POST["name"]);
    $message = '';
    for($i=0;$i<$rows_count;$i++){
        // PREVENTING SQL INJECTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        $employee_name = mysqli_real_escape_string($conn,$_POST["employee_name"][$i]);
        $name = mysqli_real_escape_string($conn,$_POST["name"][$i]);
        $code = mysqli_real_escape_string($conn,$_POST["code"][$i]);
        $quantity = intval($_POST["quantity"][$i]);
        $price = mysqli_real_escape_string($conn,$_POST["price"][$i]);
        $sql = "INSERT INTO order_table ( employee_name, name, code, quantity, price) 
            VALUES ('$employee_name', '$name', '$code', '$quantity', '$price')";
        $query = mysqli_query($conn,$sql);
        if(mysqli_affected_rows($conn)>0) {
                $message .=
                "employee_name: " . $employee_name . " 
                " ."name: ".  $name ." 
                ". "code: " . $code . " 
                " ."quantity: ".  $quantity . " 
                ". "price: " . $price . "";
        }
    }
    if ( ! empty($message)) {
        $to = "xgrh@gmail.com";
        $subject = "Supplies";
        $headers = "From: user@gmail.com"; 
        mail($to,$subject,$message,$headers); 
    }
    ?>
    <h1 align="center">Supply Request Confirmation</h1>
    <p align="center">Thank you, <?php echo $employee_name; ?><br><br>
        Your request has been sent. 
        Please print this page out for your copy.</p>
    <div align="center">
        <h2>Request Information</h2>
    </div>
    <table style="width: 45%" align="center">
        <tr>
            <td class="style">Date Request: <?php $date = new DateTime();
    echo $date->format('m/d/Y H:i:s') . "\n";  ?></td>
        </tr>
        <?php for($i=0;$i<$rows_count;$i++){?>
        <tr>
            <td class="style">name: <?php echo $name; ?></td>
        </tr>
        <tr>
            <td class="style">  code: <?php echo $code;  ?></td>
        </tr>
        <tr>
            <td class="style">  Quantity: <?php echo $quantity;  ?></td>
        </tr>
        <tr>
            <td class="style">  price: <?php echo $price;  ?></td>
        </tr>
        <?php } ?>
    </table>
    <div align="center"><button onClick="window.print()">Print this page</button></div>
    </body>
    </html> 
 
    