Export some selected data from MySQL database without duplicate

I am having an issue with my MySQL query am not sure where the error is exactly.
Have some data in MySQL database, when I try to export some selected data as Excel format it works but it duplicates the data.

This is my database and the table name is tbl_employee

Mysql database

This is the output of the selected data on webpage
Webpage data

Below is the code although I saw this online and try to modify it by adding a checkbox to select some desire data

index.php

   <?php
    $connect = mysqli_connect("localhost", "root", "", "export");
    $query = "SELECT * FROM tbl_employee ORDER BY id desc";
    $result = mysqli_query($connect, $query);
    ?>
    <!DOCTYPE html>
    <html>

    <head>
        <title>Webslesson Tutorial | Export Mysql Table Data to CSV file in PHP</title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    </head>

    <body>
        <br /><br />
        <div class="container" style="width:900px;">
            <h2 align="center">Export Mysql Table Data to CSV file in PHP</h2>
            <h3 align="center">Employee Data</h3>
            <br />
            <form method="post" action="export.php" align="center">
                <input type="submit" name="export" value="CSV Export" class="btn btn-success" />
                <br />
                <div class="table-responsive" id="employee_table">
                    <table class="table table-bordered">
                        <tr>
                            <th width="5%">ID</th>
                            <th width="5%">Select</th>
                            <th width="25%">Name</th>
                            <th width="35%">Address</th>
                            <th width="10%">Gender</th>
                            <th width="20%">Designation</th>
                            <th width="5%">Age</th>
                            </tr>
                            <?php
                            while ($row = mysqli_fetch_array($result)) {
                            ?>
                            <tr>
                                <td><?php echo $row["Id"]; ?></td>
                                <td><input type="checkbox" id="vehicle1" name="txtSelectedId[]" value="<?php echo $row["Id"]; ?>"></td>
                                <td><?php echo $row["col_name"]; ?></td>
                                <td><?php echo $row["col_address"]; ?></td>
                                <td><?php echo $row["col_gender"]; ?></td>
                                <td><?php echo $row["col_designation"]; ?></td>
                                <td><?php echo $row["col_age"]; ?></td>
                                </tr>
                        <?php
                        }
                        ?>
                    </table>
                </div>
            </form>
        </div>
    </body>

    </html>

export.php

    if (isset($_POST["export"])) {
        $connect = mysqli_connect("localhost", "root", "", "export");
        header('Content-Type: text/csv; charset=utf-8');
        header('Content-Disposition: attachment; filename=data.csv');
        $output = fopen("php://output", "w");
        fputcsv($output, array('Name', 'Address', 'Gender', 'Designation', 'Age'));

        foreach ($_POST["txtSelectedId"] as $selectedbox) {
            $query = "SELECT * from tbl_employee WHERE id = '$selectedbox' ORDER BY id ";
            $result = mysqli_query($connect, $query);
            $display = mysqli_fetch_array($result);
            fputcsv($output, $display);
        }
    }
    fclose($output);

This is what I get when I open the downloaded file in Excel
The downloaed file result

As you can see it suppose to be single data entry not double please I want the data to display in the same column
I want it to be like this

My desired result

And also I also like to export this same data with checkbox as PDF and download too.
Please anyone help

php generate qrcode as .eps using chillerlan/php-qrcode library for use as a vector graphic

I’m using the chillerlan php-qrcode library to generate a qrcode. With my current code it generates a new file “qrcode.eps” in the same folder as my controller. But when I looked into the file, I noticed that the file only contains xml code for svg. I need the library to generate the qrcode as a real .eps so our design department can use the .eps file for Adobe Illustrator.

Controller with qrCode generation.

public function generateQrCode(string $url, string $qrCodeType): string
    {
        $options = new QROptions();

        $options->version           = 7;
        $options->outputInterface   = QREps::class;
        $options->scale             = 5;
        $options->drawLightModules  = false;
        $options->bgColor           = [222, 222, 222];
        $options->moduleValues      = [
            // finder
            QRMatrix::M_FINDER_DARK    => [0, 63, 255],    // dark (true)
            QRMatrix::M_FINDER_DOT     => [0, 63, 255],    // finder dot, dark (true)
            QRMatrix::M_FINDER         => [233, 233, 233], // light (false)
            // alignment
            QRMatrix::M_ALIGNMENT_DARK => [255, 0, 255],
            QRMatrix::M_ALIGNMENT      => [233, 233, 233],
            // timing
            QRMatrix::M_TIMING_DARK    => [255, 0, 0],
            QRMatrix::M_TIMING         => [233, 233, 233],
            // format
            QRMatrix::M_FORMAT_DARK    => [67, 159, 84],
            QRMatrix::M_FORMAT         => [233, 233, 233],
            // version
            QRMatrix::M_VERSION_DARK   => [62, 174, 190],
            QRMatrix::M_VERSION        => [233, 233, 233],
            // data
            QRMatrix::M_DATA_DARK      => [0, 0, 0],
            QRMatrix::M_DATA           => [233, 233, 233],
            // darkmodule
            QRMatrix::M_DARKMODULE     => [0, 0, 0],
            // separator
            QRMatrix::M_SEPARATOR      => [233, 233, 233],
            // quietzone
            QRMatrix::M_QUIETZONE      => [233, 233, 233],
            // logo space (requires a call to QRMatrix::setLogoSpace()), see imageWithLogo example
            QRMatrix::M_LOGO           => [233, 233, 233],
        ];

        $qrcode = (new QRCode($options))->render($url, __DIR__ . '/qrcode.eps');

        if(php_sapi_name() !== 'cli'){
            // Muss als File Download gesendet werden, da Browser normalerweise EPS nicht unterstützt
            header('Content-type: application/postscript');
            header('Content-Disposition: filename="qrcode.eps"');
        }

        return $qrcode;
    }

qrcode.eps

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" class="qr-svg qrcode" viewBox="0 0 53 53" preserveAspectRatio="xMidYMid">
<path class="qr-darkmodule dark qrcode" fill="#000" d="M12 41 h1 v1 h-1Z"/>
<path class="qr-data-dark dark qrcode" fill="#000" d="M14 4 h1 v1 h-1Z M15 4 h1 v1 h-1Z M17 4 h1 v1 h-1Z M18 4 h1 v1 h-1Z M19 4 h1 v1 h-1Z M20 4 h1 v1 h-1Z M21 4 h1 v1 h-1Z M22 4 h1 v1 h-1Z M23 4 h1 v1 h-1Z M24 4 h1 v1 h-1Z M27 4 h1 v1 h-1Z M28 4 h1 v1 h-1Z M32 4 h1 v1 h-1Z M34 4 h1 v1 h-1Z M36 4 h1 v1 h-1Z M37 4 h1 v1 h-1Z M13 5 h1 v1 h-1Z M16 5 h1 v1 h-1Z M17 5 h1 v1 h-1Z M18 5 h1 v1 h-1Z M20 5 h1 v1 h-1Z M21 5 h1 v1 h-1Z M24 5 h1 v1 h-1Z M25 5 h1 v1 h-1Z M28 5 h1 v1 h-1Z M29 5 h1 v1 h-1Z M30 5 h1 v1 h-1Z M31 5 h1 v1 h-1Z M32 5 h1 v1 h-1Z M33 5 h1 v1 h-1Z M34 5 h1 v1 h-1Z M35 5 h1 v1 h-1Z M36 5 h1 v1 h-1Z M15 6 h1 v1 h-1Z M16 6 h1 v1 h-1Z M17 6 h1 v1 h-1Z M21 6 h1 v1 h-1Z M22 6 h1 v1 h-1Z M25 6 h1 v1 h-1Z M26 6 h1 v1 h-1Z M29 6 h1 v1 h-1Z M30 6 h1 v1 h-1Z M32 6 h1 v1 h-1Z M33 6 h1 v1 h-1Z M14 7 h1 v1 h-1Z M16 7 h1 v1 h-1Z M19 7 h1 v1 h-1Z M20 7 h1 v1 h-1Z M22 7 h1 v1 h-1Z M23 7 h1 v1 h-1Z M26 7 h1 v1 h-1Z M27 7 h1 v1 h-1Z M30 7 h1 v1 h-1Z M31 7 h1 v1 h-1Z M32 7 h1 v1 h-1Z M35 7 h1 v1 h-1Z M36 7 h1 v1 h-1Z M13 8 h1 v1 h-1Z M14 8 h1 v1 h-1Z M15 8 h1 v1 h-1Z M16 8 h1 v1 h-1Z M18 8 h1 v1 h-1Z M19 8 h1 v1 h-1Z M20 8 h1 v1 h-1Z M22 8 h1 v1 h-1Z M23 8 h1 v1 h-1Z M31 8 h1 v1 h-1Z M34 8 h1 v1 h-1Z M35 8 h1 v1 h-1Z M15 9 h1 v1 h-1Z M16 9 h1 v1 h-1Z M17 9 h1 v1 h-1Z M18 9 h1 v1 h-1Z M20 9 h1 v1 h-1Z M21 9 h1 v1 h-1Z M23 9 h1 v1 h-1Z M29 9 h1 v1 h-1Z M30 9 h1 v1 h-1Z M33 9 h1 v1 h-1Z M34 9 h1 v1 h-1Z M15 11 h1 v1 h-1Z M17 11 h1 v1 h-1Z M21 11 h1 v1 h-1Z M22 11 h1 v1 h-1Z M23 11 h1 v1 h-1Z M32 11 h1 v1 h-1Z M34 11 h1 v1 h-1Z M37 11 h1 v1 h-1Z M38 11 h1 v1 h-1Z M40 11 h1 v1 h-1Z M13 12 h1 v1 h-1Z M14 12 h1 v1 h-1Z M16 12 h1 v1 h-1Z M17 12 h1 v1 h-1Z M18 12 h1 v1 h-1Z M19 12 h1 v1 h-1Z M21 12 h1 v1 h-1Z M23 12 h1 v1 h-1Z M30 12 h1 v1 h-1Z M37 12 h1 v1 h-1Z
M40 12 h1 v1 h-1Z M11 13 h1 v1 h-1Z M15 13 h1 v1 h-1Z M18 13 h1 v1 h-1Z M22 13 h1 v1 h-1Z M23 13 h1 v1 h-1Z M24 13 h1 v1 h-1Z M25 13 h1 v1 h-1Z M26 13 h1 v1 h-1Z M28 13 h1 v1 h-1Z M29 13 h1 v1 h-1Z M30 13 h1 v1 h-1Z M31 13 h1 v1 h-1Z M33 13 h1 v1 h-1Z M35 13 h1 v1 h-1Z M39 13 h1 v1 h-1Z M41 13 h1 v1 h-1Z M42 13 h1 v1 h-1Z M43 13 h1 v1 h-1Z M46 13 h1 v1 h-1Z M48 13 h1 v1 h-1Z M6 14 h1 v1 h-1Z M8 14 h1 v1 h-1Z M14 14 h1 v1 h-1Z M15 14 h1 v1 h-1Z M16 14 h1 v1 h-1Z M17 14 h1 v1 h-1Z M18 14 h1 v1 h-1Z M20 14 h1 v1 h-1Z M21 14 h1 v1 h-1Z M25 14 h1 v1 h-1Z M28 14 h1 v1 h-1Z M29 14 h1 v1 h-1Z M31 14 h1 v1 h-1Z M32 14 h1 v1 h-1Z M33 14 h1 v1 h-1Z M35 14 h1 v1 h-1Z M36 14 h1 v1 h-1Z M38 14 h1 v1 h-1Z M39 14 h1 v1 h-1Z M40 14 h1 v1 h-1Z M41 14 h1 v1 h-1Z M43 14 h1 v1 h-1Z M44 14 h1 v1 h-1Z M7 15 h1 v1 h-1Z M8 15 h1 v1 h-1Z M13 15 h1 v1 h-1Z M18 15 h1 v1 h-1Z M19 15 h1 v1 h-1Z M20 15 h1 v1 h-1Z M23 15 h1 v1 h-1Z M24 15 h1 v1 h-1Z M27 15 h1 v1 h-1Z M28 15 h1 v1 h-1Z M31 15 h1 v1 h-1Z M32 15 h1 v1 h-1Z M34 15 h1 v1 h-1Z M35 15 h1 v1 h-1Z M37 15 h1 v1 h-1Z M38 15 h1 v1 h-1Z M40 15 h1 v1 h-1Z M43 15 h1 v1 h-1Z M44 15 h1 v1 h-1Z M45 15 h1 v1 h-1Z M47 15 h1 v1 h-1Z M5 16 h1 v1 h-1Z M6 16 h1 v1 h-1Z M7 16 h1 v1 h-1Z M8 16 h1 v1 h-1Z M12 16 h1 v1 h-1Z M14 16 h1 v1 h-1Z M15 16 h1 v1 h-1Z M19 16 h1 v1 h-1Z M22 16 h1 v1 h-1Z M23 16 h1 v1 h-1Z M27 16 h1 v1 h-1Z M30 16 h1 v1 h-1Z M31 16 h1 v1 h-1Z M32 16 h1 v1 h-1Z M35 16 h1 v1 h-1Z M36 16 h1 v1 h-1Z M37 16 h1 v1 h-1Z M39 16 h1 v1 h-1Z M40 16 h1 v1 h-1Z M42 16 h1 v1 h-1Z M43 16 h1 v1 h-1Z M44 16 h1 v1 h-1Z M45 16 h1 v1 h-1Z M46 16 h1 v1 h-1Z M47 16 h1 v1 h-1Z M48 16 h1 v1 h-1Z M5 17 h1 v1 h-1Z M6 17 h1 v1 h-1Z M7 17 h1 v1 h-1Z M9 17 h1 v1 h-1Z M15 17 h1 v1 h-1Z M17 17 h1 v1 h-1Z M18 17 h1 v1 h-1Z M21 17 h1 v1 h-1Z M22 17 h1 v1 h-1Z
M25 17 h1 v1 h-1Z M26 17 h1 v1 h-1Z M28 17 h1 v1 h-1Z M29 17 h1 v1 h-1Z M30 17 h1 v1 h-1Z M32 17 h1 v1 h-1Z M33 17 h1 v1 h-1Z M36 17 h1 v1 h-1Z M40 17 h1 v1 h-1Z M41 17 h1 v1 h-1Z M42 17 h1 v1 h-1Z M44 17 h1 v1 h-1Z M45 17 h1 v1 h-1Z M47 17 h1 v1 h-1Z M48 17 h1 v1 h-1Z M4 18 h1 v1 h-1Z M6 18 h1 v1 h-1Z M9 18 h1 v1 h-1Z M12 18 h1 v1 h-1Z M17 18 h1 v1 h-1Z M18 18 h1 v1 h-1Z M20 18 h1 v1 h-1Z M21 18 h1 v1 h-1Z M25 18 h1 v1 h-1Z M28 18 h1 v1 h-1Z M29 18 h1 v1 h-1Z M33 18 h1 v1 h-1Z M38 18 h1 v1 h-1Z M41 18 h1 v1 h-1Z M45 18 h1 v1 h-1Z M46 18 h1 v1 h-1Z M47 18 h1 v1 h-1Z M48 18 h1 v1 h-1Z M4 19 h1 v1 h-1Z M6 19 h1 v1 h-1Z M8 19 h1 v1 h-1Z M9 19 h1 v1 h-1Z M13 19 h1 v1 h-1Z M18 19 h1 v1 h-1Z M19 19 h1 v1 h-1Z M20 19 h1 v1 h-1Z M23 19 h1 v1 h-1Z M24 19 h1 v1 h-1Z M27 19 h1 v1 h-1Z M28 19 h1 v1 h-1Z M29 19 h1 v1 h-1Z M30 19 h1 v1 h-1Z M31 19 h1 v1 h-1Z M32 19 h1 v1 h-1Z M33 19 h1 v1 h-1Z M35 19 h1 v1 h-1Z M39 19 h1 v1 h-1Z M41 19 h1 v1 h-1Z M42 19 h1 v1 h-1Z M43 19 h1 v1 h-1Z M44 19 h1 v1 h-1Z M46 19 h1 v1 h-1Z M48 19 h1 v1 h-1Z M6 20 h1 v1 h-1Z M7 20 h1 v1 h-1Z M11 20 h1 v1 h-1Z M12 20 h1 v1 h-1Z M15 20 h1 v1 h-1Z M16 20 h1 v1 h-1Z M22 20 h1 v1 h-1Z M23 20 h1 v1 h-1Z M27 20 h1 v1 h-1Z M29 20 h1 v1 h-1Z M31 20 h1 v1 h-1Z M32 20 h1 v1 h-1Z M33 20 h1 v1 h-1Z M34 20 h1 v1 h-1Z M35 20 h1 v1 h-1Z M36 20 h1 v1 h-1Z M38 20 h1 v1 h-1Z M39 20 h1 v1 h-1Z M40 20 h1 v1 h-1Z M41 20 h1 v1 h-1Z M43 20 h1 v1 h-1Z M44 20 h1 v1 h-1Z M46 20 h1 v1 h-1Z M4 21 h1 v1 h-1Z M5 21 h1 v1 h-1Z M7 21 h1 v1 h-1Z M12 21 h1 v1 h-1Z M13 21 h1 v1 h-1Z M16 21 h1 v1 h-1Z M17 21 h1 v1 h-1Z M18 21 h1 v1 h-1Z M19 21 h1 v1 h-1Z M20 21 h1 v1 h-1Z M21 21 h1 v1 h-1Z M22 21 h1 v1 h-1Z M27 21 h1 v1 h-1Z M28 21 h1 v1 h-1Z M32 21 h1 v1 h-1Z M34 21 h1 v1 h-1Z M36 21 h1 v1 h-1Z M37 21 h1 v1 h-1Z M38 21 h1 v1 h-1Z
M40 21 h1 v1 h-1Z M44 21 h1 v1 h-1Z M45 21 h1 v1 h-1Z M47 21 h1 v1 h-1Z M48 21 h1 v1 h-1Z M4 22 h1 v1 h-1Z M7 22 h1 v1 h-1Z M8 22 h1 v1 h-1Z M12 22 h1 v1 h-1Z M14 22 h1 v1 h-1Z M15 22 h1 v1 h-1Z M16 22 h1 v1 h-1Z M19 22 h1 v1 h-1Z M22 22 h1 v1 h-1Z M23 22 h1 v1 h-1Z M26 22 h1 v1 h-1Z M27 22 h1 v1 h-1Z M37 22 h1 v1 h-1Z M38 22 h1 v1 h-1Z M45 22 h1 v1 h-1Z M46 22 h1 v1 h-1Z M47 22 h1 v1 h-1Z M48 22 h1 v1 h-1Z M4 23 h1 v1 h-1Z M5 23 h1 v1 h-1Z M7 23 h1 v1 h-1Z M9 23 h1 v1 h-1Z M12 23 h1 v1 h-1Z M13 23 h1 v1 h-1Z M14 23 h1 v1 h-1Z M17 23 h1 v1 h-1Z M21 23 h1 v1 h-1Z M22 23 h1 v1 h-1Z M25 23 h1 v1 h-1Z M26 23 h1 v1 h-1Z M29 23 h1 v1 h-1Z M30 23 h1 v1 h-1Z M32 23 h1 v1 h-1Z M33 23 h1 v1 h-1Z M39 23 h1 v1 h-1Z M41 23 h1 v1 h-1Z M42 23 h1 v1 h-1Z M44 23 h1 v1 h-1Z M46 23 h1 v1 h-1Z M48 23 h1 v1 h-1Z M6 24 h1 v1 h-1Z M15 24 h1 v1 h-1Z M17 24 h1 v1 h-1Z M18 24 h1 v1 h-1Z M21 24 h1 v1 h-1Z M29 24 h1 v1 h-1Z M33 24 h1 v1 h-1Z M34 24 h1 v1 h-1Z M38 24 h1 v1 h-1Z M46 24 h1 v1 h-1Z M4 25 h1 v1 h-1Z M5 25 h1 v1 h-1Z M6 25 h1 v1 h-1Z M7 25 h1 v1 h-1Z M13 25 h1 v1 h-1Z M18 25 h1 v1 h-1Z M19 25 h1 v1 h-1Z M20 25 h1 v1 h-1Z M22 25 h1 v1 h-1Z M23 25 h1 v1 h-1Z M31 25 h1 v1 h-1Z M34 25 h1 v1 h-1Z M35 25 h1 v1 h-1Z M37 25 h1 v1 h-1Z M38 25 h1 v1 h-1Z M46 25 h1 v1 h-1Z M48 25 h1 v1 h-1Z M4 26 h1 v1 h-1Z M6 26 h1 v1 h-1Z M7 26 h1 v1 h-1Z M13 26 h1 v1 h-1Z M16 26 h1 v1 h-1Z M19 26 h1 v1 h-1Z M22 26 h1 v1 h-1Z M31 26 h1 v1 h-1Z M32 26 h1 v1 h-1Z M35 26 h1 v1 h-1Z M36 26 h1 v1 h-1Z M37 26 h1 v1 h-1Z M38 26 h1 v1 h-1Z M4 27 h1 v1 h-1Z M6 27 h1 v1 h-1Z M15 27 h1 v1 h-1Z M17 27 h1 v1 h-1Z M21 27 h1 v1 h-1Z M22 27 h1 v1 h-1Z M32 27 h1 v1 h-1Z M34 27 h1 v1 h-1Z M37 27 h1 v1 h-1Z M38 27 h1 v1 h-1Z M45 27 h1 v1 h-1Z M47 27 h1 v1 h-1Z M5 28 h1 v1 h-1Z M13 28 h1 v1 h-1Z M16 28 h1 v1 h-1Z
M17 28 h1 v1 h-1Z M18 28 h1 v1 h-1Z M19 28 h1 v1 h-1Z M21 28 h1 v1 h-1Z M30 28 h1 v1 h-1Z M37 28 h1 v1 h-1Z M45 28 h1 v1 h-1Z M46 28 h1 v1 h-1Z M47 28 h1 v1 h-1Z M48 28 h1 v1 h-1Z M6 29 h1 v1 h-1Z M7 29 h1 v1 h-1Z M8 29 h1 v1 h-1Z M12 29 h1 v1 h-1Z M15 29 h1 v1 h-1Z M18 29 h1 v1 h-1Z M22 29 h1 v1 h-1Z M23 29 h1 v1 h-1Z M24 29 h1 v1 h-1Z M25 29 h1 v1 h-1Z M28 29 h1 v1 h-1Z M29 29 h1 v1 h-1Z M30 29 h1 v1 h-1Z M31 29 h1 v1 h-1Z M33 29 h1 v1 h-1Z M35 29 h1 v1 h-1Z M39 29 h1 v1 h-1Z M41 29 h1 v1 h-1Z M46 29 h1 v1 h-1Z M48 29 h1 v1 h-1Z M4 30 h1 v1 h-1Z M7 30 h1 v1 h-1Z M8 30 h1 v1 h-1Z M9 30 h1 v1 h-1Z M13 30 h1 v1 h-1Z M15 30 h1 v1 h-1Z M16 30 h1 v1 h-1Z M17 30 h1 v1 h-1Z M18 30 h1 v1 h-1Z M20 30 h1 v1 h-1Z M21 30 h1 v1 h-1Z M24 30 h1 v1 h-1Z M25 30 h1 v1 h-1Z M26 30 h1 v1 h-1Z M29 30 h1 v1 h-1Z M31 30 h1 v1 h-1Z M32 30 h1 v1 h-1Z M33 30 h1 v1 h-1Z M35 30 h1 v1 h-1Z M36 30 h1 v1 h-1Z M38 30 h1 v1 h-1Z M41 30 h1 v1 h-1Z M42 30 h1 v1 h-1Z M44 30 h1 v1 h-1Z M6 31 h1 v1 h-1Z M8 31 h1 v1 h-1Z M12 31 h1 v1 h-1Z M16 31 h1 v1 h-1Z M18 31 h1 v1 h-1Z M19 31 h1 v1 h-1Z M20 31 h1 v1 h-1Z M26 31 h1 v1 h-1Z M27 31 h1 v1 h-1Z M31 31 h1 v1 h-1Z M32 31 h1 v1 h-1Z M34 31 h1 v1 h-1Z M35 31 h1 v1 h-1Z M37 31 h1 v1 h-1Z M38 31 h1 v1 h-1Z M39 31 h1 v1 h-1Z M40 31 h1 v1 h-1Z M43 31 h1 v1 h-1Z M44 31 h1 v1 h-1Z M45 31 h1 v1 h-1Z M47 31 h1 v1 h-1Z M5 32 h1 v1 h-1Z M6 32 h1 v1 h-1Z M8 32 h1 v1 h-1Z M13 32 h1 v1 h-1Z M14 32 h1 v1 h-1Z M16 32 h1 v1 h-1Z M19 32 h1 v1 h-1Z M22 32 h1 v1 h-1Z M23 32 h1 v1 h-1Z M24 32 h1 v1 h-1Z M27 32 h1 v1 h-1Z M28 32 h1 v1 h-1Z M30 32 h1 v1 h-1Z M31 32 h1 v1 h-1Z M32 32 h1 v1 h-1Z M35 32 h1 v1 h-1Z M36 32 h1 v1 h-1Z M37 32 h1 v1 h-1Z M39 32 h1 v1 h-1Z M40 32 h1 v1 h-1Z M41 32 h1 v1 h-1Z M42 32 h1 v1 h-1Z M43 32 h1 v1 h-1Z M45 32 h1 v1 h-1Z M46 32 h1 v1 h-1Z
M47 32 h1 v1 h-1Z M48 32 h1 v1 h-1Z M5 33 h1 v1 h-1Z M15 33 h1 v1 h-1Z M17 33 h1 v1 h-1Z M18 33 h1 v1 h-1Z M21 33 h1 v1 h-1Z M22 33 h1 v1 h-1Z M23 33 h1 v1 h-1Z M25 33 h1 v1 h-1Z M28 33 h1 v1 h-1Z M29 33 h1 v1 h-1Z M30 33 h1 v1 h-1Z M32 33 h1 v1 h-1Z M33 33 h1 v1 h-1Z M36 33 h1 v1 h-1Z M39 33 h1 v1 h-1Z M42 33 h1 v1 h-1Z M45 33 h1 v1 h-1Z M47 33 h1 v1 h-1Z M48 33 h1 v1 h-1Z M5 34 h1 v1 h-1Z M7 34 h1 v1 h-1Z M8 34 h1 v1 h-1Z M13 34 h1 v1 h-1Z M14 34 h1 v1 h-1Z M15 34 h1 v1 h-1Z M16 34 h1 v1 h-1Z M17 34 h1 v1 h-1Z M18 34 h1 v1 h-1Z M20 34 h1 v1 h-1Z M21 34 h1 v1 h-1Z M23 34 h1 v1 h-1Z M27 34 h1 v1 h-1Z M29 34 h1 v1 h-1Z M33 34 h1 v1 h-1Z M38 34 h1 v1 h-1Z M40 34 h1 v1 h-1Z M44 34 h1 v1 h-1Z M45 34 h1 v1 h-1Z M46 34 h1 v1 h-1Z M47 34 h1 v1 h-1Z M48 34 h1 v1 h-1Z M4 35 h1 v1 h-1Z M5 35 h1 v1 h-1Z M6 35 h1 v1 h-1Z M9 35 h1 v1 h-1Z M12 35 h1 v1 h-1Z M13 35 h1 v1 h-1Z M16 35 h1 v1 h-1Z M18 35 h1 v1 h-1Z M19 35 h1 v1 h-1Z M20 35 h1 v1 h-1Z M23 35 h1 v1 h-1Z M24 35 h1 v1 h-1Z M25 35 h1 v1 h-1Z M28 35 h1 v1 h-1Z M29 35 h1 v1 h-1Z M30 35 h1 v1 h-1Z M31 35 h1 v1 h-1Z M32 35 h1 v1 h-1Z M33 35 h1 v1 h-1Z M35 35 h1 v1 h-1Z M39 35 h1 v1 h-1Z M41 35 h1 v1 h-1Z M43 35 h1 v1 h-1Z M44 35 h1 v1 h-1Z M46 35 h1 v1 h-1Z M48 35 h1 v1 h-1Z M4 36 h1 v1 h-1Z M5 36 h1 v1 h-1Z M6 36 h1 v1 h-1Z M8 36 h1 v1 h-1Z M9 36 h1 v1 h-1Z M12 36 h1 v1 h-1Z M15 36 h1 v1 h-1Z M16 36 h1 v1 h-1Z M22 36 h1 v1 h-1Z M24 36 h1 v1 h-1Z M25 36 h1 v1 h-1Z M26 36 h1 v1 h-1Z M29 36 h1 v1 h-1Z M31 36 h1 v1 h-1Z M32 36 h1 v1 h-1Z M33 36 h1 v1 h-1Z M34 36 h1 v1 h-1Z M35 36 h1 v1 h-1Z M36 36 h1 v1 h-1Z M38 36 h1 v1 h-1Z M41 36 h1 v1 h-1Z M42 36 h1 v1 h-1Z M46 36 h1 v1 h-1Z M4 37 h1 v1 h-1Z M5 37 h1 v1 h-1Z M7 37 h1 v1 h-1Z M9 37 h1 v1 h-1Z M12 37 h1 v1 h-1Z M13 37 h1 v1 h-1Z M16 37 h1 v1 h-1Z M17 37 h1 v1 h-1Z
M18 37 h1 v1 h-1Z M19 37 h1 v1 h-1Z M20 37 h1 v1 h-1Z M21 37 h1 v1 h-1Z M22 37 h1 v1 h-1Z M23 37 h1 v1 h-1Z M27 37 h1 v1 h-1Z M32 37 h1 v1 h-1Z M34 37 h1 v1 h-1Z M36 37 h1 v1 h-1Z M37 37 h1 v1 h-1Z M38 37 h1 v1 h-1Z M40 37 h1 v1 h-1Z M42 37 h1 v1 h-1Z M43 37 h1 v1 h-1Z M44 37 h1 v1 h-1Z M45 37 h1 v1 h-1Z M47 37 h1 v1 h-1Z M48 37 h1 v1 h-1Z M11 38 h1 v1 h-1Z M12 38 h1 v1 h-1Z M19 38 h1 v1 h-1Z M22 38 h1 v1 h-1Z M23 38 h1 v1 h-1Z M27 38 h1 v1 h-1Z M37 38 h1 v1 h-1Z M38 38 h1 v1 h-1Z M39 38 h1 v1 h-1Z M40 38 h1 v1 h-1Z M43 38 h1 v1 h-1Z M45 38 h1 v1 h-1Z M46 38 h1 v1 h-1Z M47 38 h1 v1 h-1Z M48 38 h1 v1 h-1Z M15 39 h1 v1 h-1Z M17 39 h1 v1 h-1Z M21 39 h1 v1 h-1Z M22 39 h1 v1 h-1Z M23 39 h1 v1 h-1Z M24 39 h1 v1 h-1Z M25 39 h1 v1 h-1Z M28 39 h1 v1 h-1Z M29 39 h1 v1 h-1Z M30 39 h1 v1 h-1Z M32 39 h1 v1 h-1Z M33 39 h1 v1 h-1Z M39 39 h1 v1 h-1Z M41 39 h1 v1 h-1Z M46 39 h1 v1 h-1Z M48 39 h1 v1 h-1Z M11 40 h1 v1 h-1Z M13 40 h1 v1 h-1Z M15 40 h1 v1 h-1Z M16 40 h1 v1 h-1Z M17 40 h1 v1 h-1Z M18 40 h1 v1 h-1Z M21 40 h1 v1 h-1Z M29 40 h1 v1 h-1Z M33 40 h1 v1 h-1Z M34 40 h1 v1 h-1Z M38 40 h1 v1 h-1Z M46 40 h1 v1 h-1Z M13 41 h1 v1 h-1Z M14 41 h1 v1 h-1Z M16 41 h1 v1 h-1Z M18 41 h1 v1 h-1Z M19 41 h1 v1 h-1Z M20 41 h1 v1 h-1Z M22 41 h1 v1 h-1Z M31 41 h1 v1 h-1Z M34 41 h1 v1 h-1Z M35 41 h1 v1 h-1Z M37 41 h1 v1 h-1Z M38 41 h1 v1 h-1Z M39 41 h1 v1 h-1Z M46 41 h1 v1 h-1Z M48 41 h1 v1 h-1Z M14 42 h1 v1 h-1Z M19 42 h1 v1 h-1Z M22 42 h1 v1 h-1Z M31 42 h1 v1 h-1Z M32 42 h1 v1 h-1Z M35 42 h1 v1 h-1Z M36 42 h1 v1 h-1Z M37 42 h1 v1 h-1Z M38 42 h1 v1 h-1Z M39 42 h1 v1 h-1Z M14 43 h1 v1 h-1Z M15 43 h1 v1 h-1Z M17 43 h1 v1 h-1Z M21 43 h1 v1 h-1Z M22 43 h1 v1 h-1Z M32 43 h1 v1 h-1Z M34 43 h1 v1 h-1Z M37 43 h1 v1 h-1Z M38 43 h1 v1 h-1Z M39 43 h1 v1 h-1Z M45 43 h1 v1 h-1Z M47 43 h1 v1 h-1Z M13 44 h1 v1 h-1Z
M14 44 h1 v1 h-1Z M16 44 h1 v1 h-1Z M17 44 h1 v1 h-1Z M18 44 h1 v1 h-1Z M19 44 h1 v1 h-1Z M21 44 h1 v1 h-1Z M23 44 h1 v1 h-1Z M30 44 h1 v1 h-1Z M37 44 h1 v1 h-1Z M45 44 h1 v1 h-1Z M46 44 h1 v1 h-1Z M47 44 h1 v1 h-1Z M48 44 h1 v1 h-1Z M13 45 h1 v1 h-1Z M15 45 h1 v1 h-1Z M18 45 h1 v1 h-1Z M22 45 h1 v1 h-1Z M24 45 h1 v1 h-1Z M25 45 h1 v1 h-1Z M26 45 h1 v1 h-1Z M29 45 h1 v1 h-1Z M30 45 h1 v1 h-1Z M31 45 h1 v1 h-1Z M33 45 h1 v1 h-1Z M35 45 h1 v1 h-1Z M40 45 h1 v1 h-1Z M46 45 h1 v1 h-1Z M47 45 h1 v1 h-1Z M48 45 h1 v1 h-1Z M13 46 h1 v1 h-1Z M14 46 h1 v1 h-1Z M15 46 h1 v1 h-1Z M16 46 h1 v1 h-1Z M17 46 h1 v1 h-1Z M18 46 h1 v1 h-1Z M20 46 h1 v1 h-1Z M21 46 h1 v1 h-1Z M25 46 h1 v1 h-1Z M26 46 h1 v1 h-1Z M28 46 h1 v1 h-1Z M29 46 h1 v1 h-1Z M31 46 h1 v1 h-1Z M32 46 h1 v1 h-1Z M33 46 h1 v1 h-1Z M35 46 h1 v1 h-1Z M36 46 h1 v1 h-1Z M38 46 h1 v1 h-1Z M40 46 h1 v1 h-1Z M42 46 h1 v1 h-1Z M13 47 h1 v1 h-1Z M16 47 h1 v1 h-1Z M18 47 h1 v1 h-1Z M19 47 h1 v1 h-1Z M20 47 h1 v1 h-1Z M23 47 h1 v1 h-1Z M25 47 h1 v1 h-1Z M26 47 h1 v1 h-1Z M31 47 h1 v1 h-1Z M32 47 h1 v1 h-1Z M34 47 h1 v1 h-1Z M35 47 h1 v1 h-1Z M37 47 h1 v1 h-1Z M38 47 h1 v1 h-1Z M39 47 h1 v1 h-1Z M40 47 h1 v1 h-1Z M41 47 h1 v1 h-1Z M42 47 h1 v1 h-1Z M43 47 h1 v1 h-1Z M45 47 h1 v1 h-1Z M13 48 h1 v1 h-1Z M16 48 h1 v1 h-1Z M19 48 h1 v1 h-1Z M22 48 h1 v1 h-1Z M23 48 h1 v1 h-1Z M24 48 h1 v1 h-1Z M25 48 h1 v1 h-1Z M28 48 h1 v1 h-1Z M30 48 h1 v1 h-1Z M31 48 h1 v1 h-1Z M32 48 h1 v1 h-1Z M35 48 h1 v1 h-1Z M36 48 h1 v1 h-1Z M37 48 h1 v1 h-1Z M39 48 h1 v1 h-1Z M41 48 h1 v1 h-1Z M42 48 h1 v1 h-1Z M43 48 h1 v1 h-1Z M44 48 h1 v1 h-1Z M45 48 h1 v1 h-1Z M46 48 h1 v1 h-1Z M47 48 h1 v1 h-1Z M48 48 h1 v1 h-1Z"/>
<path class="qr-finder-dark dark qrcode" fill="#000" d="M4 4 h1 v1 h-1Z M5 4 h1 v1 h-1Z M6 4 h1 v1 h-1Z M7 4 h1 v1 h-1Z M8 4 h1 v1 h-1Z M9 4 h1 v1 h-1Z M10 4 h1 v1 h-1Z M42 4 h1 v1 h-1Z M43 4 h1 v1 h-1Z M44 4 h1 v1 h-1Z M45 4 h1 v1 h-1Z M46 4 h1 v1 h-1Z M47 4 h1 v1 h-1Z M48 4 h1 v1 h-1Z M4 5 h1 v1 h-1Z M10 5 h1 v1 h-1Z M42 5 h1 v1 h-1Z M48 5 h1 v1 h-1Z M4 6 h1 v1 h-1Z M10 6 h1 v1 h-1Z M42 6 h1 v1 h-1Z M48 6 h1 v1 h-1Z M4 7 h1 v1 h-1Z M10 7 h1 v1 h-1Z M42 7 h1 v1 h-1Z M48 7 h1 v1 h-1Z M4 8 h1 v1 h-1Z M10 8 h1 v1 h-1Z M42 8 h1 v1 h-1Z M48 8 h1 v1 h-1Z M4 9 h1 v1 h-1Z M10 9 h1 v1 h-1Z M42 9 h1 v1 h-1Z M48 9 h1 v1 h-1Z M4 10 h1 v1 h-1Z M5 10 h1 v1 h-1Z M6 10 h1 v1 h-1Z M7 10 h1 v1 h-1Z M8 10 h1 v1 h-1Z M9 10 h1 v1 h-1Z M10 10 h1 v1 h-1Z M42 10 h1 v1 h-1Z M43 10 h1 v1 h-1Z M44 10 h1 v1 h-1Z M45 10 h1 v1 h-1Z M46 10 h1 v1 h-1Z M47 10 h1 v1 h-1Z M48 10 h1 v1 h-1Z M4 42 h1 v1 h-1Z M5 42 h1 v1 h-1Z M6 42 h1 v1 h-1Z M7 42 h1 v1 h-1Z M8 42 h1 v1 h-1Z M9 42 h1 v1 h-1Z M10 42 h1 v1 h-1Z M4 43 h1 v1 h-1Z M10 43 h1 v1 h-1Z M4 44 h1 v1 h-1Z M10 44 h1 v1 h-1Z M4 45 h1 v1 h-1Z M10 45 h1 v1 h-1Z M4 46 h1 v1 h-1Z M10 46 h1 v1 h-1Z M4 47 h1 v1 h-1Z M10 47 h1 v1 h-1Z M4 48 h1 v1 h-1Z M5 48 h1 v1 h-1Z M6 48 h1 v1 h-1Z M7 48 h1 v1 h-1Z M8 48 h1 v1 h-1Z M9 48 h1 v1 h-1Z M10 48 h1 v1 h-1Z"/>
<path class="qr-alignment-dark dark qrcode" fill="#000" d="M24 8 h1 v1 h-1Z M25 8 h1 v1 h-1Z M26 8 h1 v1 h-1Z M27 8 h1 v1 h-1Z M28 8 h1 v1 h-1Z M24 9 h1 v1 h-1Z M28 9 h1 v1 h-1Z M24 10 h1 v1 h-1Z M26 10 h1 v1 h-1Z M28 10 h1 v1 h-1Z M24 11 h1 v1 h-1Z M28 11 h1 v1 h-1Z M24 12 h1 v1 h-1Z M25 12 h1 v1 h-1Z M26 12 h1 v1 h-1Z M27 12 h1 v1 h-1Z M28 12 h1 v1 h-1Z M8 24 h1 v1 h-1Z M9 24 h1 v1 h-1Z M10 24 h1 v1 h-1Z M11 24 h1 v1 h-1Z M12 24 h1 v1 h-1Z M24 24 h1 v1 h-1Z M25 24 h1 v1 h-1Z M26 24 h1 v1 h-1Z M27 24 h1 v1 h-1Z M28 24 h1 v1 h-1Z M40 24 h1 v1 h-1Z M41 24 h1 v1 h-1Z M42 24 h1 v1 h-1Z M43 24 h1 v1 h-1Z M44 24 h1 v1 h-1Z M8 25 h1 v1 h-1Z M12 25 h1 v1 h-1Z M24 25 h1 v1 h-1Z M28 25 h1 v1 h-1Z M40 25 h1 v1 h-1Z M44 25 h1 v1 h-1Z M8 26 h1 v1 h-1Z M10 26 h1 v1 h-1Z M12 26 h1 v1 h-1Z M24 26 h1 v1 h-1Z M26 26 h1 v1 h-1Z M28 26 h1 v1 h-1Z M40 26 h1 v1 h-1Z M42 26 h1 v1 h-1Z M44 26 h1 v1 h-1Z M8 27 h1 v1 h-1Z M12 27 h1 v1 h-1Z M24 27 h1 v1 h-1Z M28 27 h1 v1 h-1Z M40 27 h1 v1 h-1Z M44 27 h1 v1 h-1Z M8 28 h1 v1 h-1Z M9 28 h1 v1 h-1Z M10 28 h1 v1 h-1Z M11 28 h1 v1 h-1Z M12 28 h1 v1 h-1Z M24 28 h1 v1 h-1Z M25 28 h1 v1 h-1Z M26 28 h1 v1 h-1Z M27 28 h1 v1 h-1Z M28 28 h1 v1 h-1Z M40 28 h1 v1 h-1Z M41 28 h1 v1 h-1Z M42 28 h1 v1 h-1Z M43 28 h1 v1 h-1Z M44 28 h1 v1 h-1Z M24 40 h1 v1 h-1Z M25 40 h1 v1 h-1Z M26 40 h1 v1 h-1Z M27 40 h1 v1 h-1Z M28 40 h1 v1 h-1Z M40 40 h1 v1 h-1Z M41 40 h1 v1 h-1Z M42 40 h1 v1 h-1Z M43 40 h1 v1 h-1Z M44 40 h1 v1 h-1Z M24 41 h1 v1 h-1Z M28 41 h1 v1 h-1Z M40 41 h1 v1 h-1Z M44 41 h1 v1 h-1Z M24 42 h1 v1 h-1Z M26 42 h1 v1 h-1Z M28 42 h1 v1 h-1Z M40 42 h1 v1 h-1Z M42 42 h1 v1 h-1Z M44 42 h1 v1 h-1Z M24 43 h1 v1 h-1Z M28 43 h1 v1 h-1Z M40 43 h1 v1 h-1Z M44 43 h1 v1 h-1Z M24 44 h1 v1 h-1Z M25 44 h1 v1 h-1Z M26 44 h1 v1 h-1Z M27 44 h1 v1 h-1Z M28 44 h1 v1 h-1Z M40 44 h1 v1 h-1Z M41 44 h1 v1 h-1Z M42 44 h1 v1 h-1Z
M43 44 h1 v1 h-1Z M44 44 h1 v1 h-1Z"/>
<path class="qr-timing-dark dark qrcode" fill="#000" d="M12 10 h1 v1 h-1Z M14 10 h1 v1 h-1Z M16 10 h1 v1 h-1Z M18 10 h1 v1 h-1Z M20 10 h1 v1 h-1Z M22 10 h1 v1 h-1Z M30 10 h1 v1 h-1Z M32 10 h1 v1 h-1Z M34 10 h1 v1 h-1Z M36 10 h1 v1 h-1Z M38 10 h1 v1 h-1Z M40 10 h1 v1 h-1Z M10 12 h1 v1 h-1Z M10 14 h1 v1 h-1Z M10 16 h1 v1 h-1Z M10 18 h1 v1 h-1Z M10 20 h1 v1 h-1Z M10 22 h1 v1 h-1Z M10 30 h1 v1 h-1Z M10 32 h1 v1 h-1Z M10 34 h1 v1 h-1Z M10 36 h1 v1 h-1Z M10 38 h1 v1 h-1Z M10 40 h1 v1 h-1Z"/>
<path class="qr-format-dark dark qrcode" fill="#000" d="M12 4 h1 v1 h-1Z M12 5 h1 v1 h-1Z M12 6 h1 v1 h-1Z M12 7 h1 v1 h-1Z M12 9 h1 v1 h-1Z M4 12 h1 v1 h-1Z M5 12 h1 v1 h-1Z M8 12 h1 v1 h-1Z M9 12 h1 v1 h-1Z M43 12 h1 v1 h-1Z M45 12 h1 v1 h-1Z M46 12 h1 v1 h-1Z M47 12 h1 v1 h-1Z M48 12 h1 v1 h-1Z M12 43 h1 v1 h-1Z M12 44 h1 v1 h-1Z M12 47 h1 v1 h-1Z M12 48 h1 v1 h-1Z"/>
<path class="qr-version-dark dark qrcode" fill="#000" d="M40 4 h1 v1 h-1Z M39 5 h1 v1 h-1Z M39 6 h1 v1 h-1Z M39 7 h1 v1 h-1Z M40 7 h1 v1 h-1Z M38 8 h1 v1 h-1Z M39 8 h1 v1 h-1Z M40 8 h1 v1 h-1Z M8 38 h1 v1 h-1Z M5 39 h1 v1 h-1Z M6 39 h1 v1 h-1Z M7 39 h1 v1 h-1Z M8 39 h1 v1 h-1Z M4 40 h1 v1 h-1Z M7 40 h1 v1 h-1Z M8 40 h1 v1 h-1Z"/>
<path class="qr-finder-dot dark qrcode" fill="#000" d="M6 6 h1 v1 h-1Z M7 6 h1 v1 h-1Z M8 6 h1 v1 h-1Z M44 6 h1 v1 h-1Z M45 6 h1 v1 h-1Z M46 6 h1 v1 h-1Z M6 7 h1 v1 h-1Z M7 7 h1 v1 h-1Z M8 7 h1 v1 h-1Z M44 7 h1 v1 h-1Z M45 7 h1 v1 h-1Z M46 7 h1 v1 h-1Z M6 8 h1 v1 h-1Z M7 8 h1 v1 h-1Z M8 8 h1 v1 h-1Z M44 8 h1 v1 h-1Z M45 8 h1 v1 h-1Z M46 8 h1 v1 h-1Z M6 44 h1 v1 h-1Z M7 44 h1 v1 h-1Z M8 44 h1 v1 h-1Z M6 45 h1 v1 h-1Z M7 45 h1 v1 h-1Z M8 45 h1 v1 h-1Z M6 46 h1 v1 h-1Z M7 46 h1 v1 h-1Z M8 46 h1 v1 h-1Z"/>
</svg>

PHP, ZendMail, xenForo | stream_socket_client(): SSL operation failed with code 1

I’m using xenForo on PHP7.0 with apache2 and Let’s Encript and have problems sending mails with SMTP.

For a specific error message I created this script:

<?php

ini_set('display_errors', true);
var_dump(stream_socket_client('ssl://DOMAIN_TO_MAILSERVER:465'));

and I’m reciving this error:

Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000086:SSL routines::certificate verify failed in /var/www/html/testscript.php on line 4

Warning: stream_socket_client(): Failed to enable crypto in /var/www/html/testscript.php on line 4

Warning: stream_socket_client(): unable to connect to ssl://DOMAIN_TO_MAILSERVER:465 (Unknown error) in /var/www/html/testscript.php on line 4
bool(false)

After now searching for a couple days I found out, that this is a ssl problem. According to other solutions I downloaded a cacert.pem file and included it to my php.ini, but this does not solve the error.

Setting verify_peer_name and verify_peer to false is not an option.
Login credentials are correct, testest with SMTP Tester online.

Hope anyone can help.

PHP fetch to get number from mysql and echo it without 1 decimal

i have a column with numbers that have 3 decimals:

<?php 
require_once 'conn.php';
    
$sql = "SELECT * FROM `mybdd`";
$query = $conn->prepare($sql);
$query->execute();

while($fetch = $query->fetch())
{
<?php echo $fetch['score']?>
}
?>

It will show ‘score’ values from the table mybd like:

SCORES
------
20,025
30,016
25,045

etc

What can i do to get ‘score’ values with only 2 decimals like:

SCORES
------
20,02
30,01
25,04

Thanks

get the correct php code

How to Implement Server Redirection with Authorization in a React App Using Apache?

I need help with server redirection in my React app. My app runs on an Apache web server. I’ve tested redirection with this PHP code:

(redirect.php)

<?php
    header('Access-Control-Allow-Origin: *');
    $url = "/";
    header("Location: $url");
    exit;
?>

(index.html)

<form id="redirectForm" action="https://.../redirect.php">
    <button type="submit">Submit</button>
</form>

Redirection works fine in a simple HTML form. But in my React app, I need the following:

  1. Authorization Header: I must send an authorization header with the request.
  2. POST Method: The request must use the POST method.
  3. No Visible Form: Using a hidden form with inputs could work, but it doesn’t handle the authorization header.

I want to avoid client-side redirection. For example, I know I could check the response, and if the status code is 302, get the new location from the header and redirect the client manually. However, I think this is not secure enough. This is especially important because I’m redirecting to a payment gateway, which needs to be handled very carefully.

How can I achieve this in a React app? Any advice or examples would be very helpful.

this is what I have implemented in my react app

const apiUrl = "https://.../serverRedirect.php";

const paymentRedirect = ({ token, body }) => {
    fetch(apiUrl, {
        body: JSON.stringify(body),
        headers: {
            // I tried "application/json" in the front-end and the back-end too
            "Content-Type": "application/x-www-form-urlencoded", 
            Authorization: `Bearer ${token}`,
        },
        method: "POST",
    });
};

export default paymentRedirect;

Registering Laravel Middleware without make it global

I’m new in laravel and I confused to how can I register middleware without making it global. in the documentation I only found it to be registered like this (bootstrapapp.php):
bootstrapapp.php

this resulting every routes I go was applied with AdminCheck middleware. meanwhile I only want login routes to be applied. also with the laravel breeze there is ‘auth’ middleware but I can’t find the code definition anywhere in the folder structure. can someone explain? thx

Target class [MyPlaceController] does not exist in Laravel 11 [closed]

What I did before error:

1. I created a new controller in Controllers with name MyPlaceController


namespace AppHttpControllers;

use IlluminateHttpRequest;

class MyPlaceController extends Controller
{
    public function index()
    {
        return 'this is my place';
    }
}

2.
After step 1 i went to web.php and writed a code:


use IlluminateSupportFacadesRoute;

Route::get('/', function () {
    return view('welcome');
});

Route::get('/my_page', 'MyPlaceController@index');

3. Starting website with command php artisan serve
After this step I got an error with text Target class [MyPlaceController] does not exist.

IlluminateContractsContainerBindingResolutionException
Target class [MyPlaceController] does not exist.

4. I tried to create those files by myself, but it didn’t worked (I also tried to create those files using cmd, but after creating there was no line with name protected $namespace 'App\Http\Controllers)

In the Laravel video course, the author used version 10. To solve this problem he went to the file called RouteServiceProvider.php and uncommented the line with the text: protected $namespace 'App\Http\Controllers' and after this action the site worked again, but in my 11 version these files are not present, and therefore I can not do the same as he did. I will also write that I have only a file named AppServiceProvider.php from all 5 files in Providers (but the author has 5 files like in the picture).
Author’s files:

  • AppServiceProvider.php
  • AuthServiceProvider.php
  • BroadcastServiceProvider.php
  • EventServiceProvider.php
  • RouteServiceProvider.php

And also I want to show my project structure:
My project structure

(just in case, I apologize that my question may not have been posed very correctly)

find the error, why it is showing this error

i have been trying to convert a html website into the wordpress theme.. and after making all the neccesary files, it is showing this error

what should I do now, which code should I change,
header.php line 9 contains this code:- ‘primary-menu’, ‘menu_class’ => ‘nav’)); ?>

An error occurred, but no information is displayed

PS : I am new to StackOverflow and in computer science. My question may be blurry, so please be understanding and kindly tell me what I can improve 🙂

I am currently testing my code with PhpUnit before deploying it.

Every test passes with success, but I still get this message :

ERRORS!
Tests: 108, Assertions: 154, Errors: 1.

I need to find out what this error is about but no information about this error is displayed ! I turned on all “display_errors” kind of parameters in my php.ini file but nothing seems to work.

Is there a simple way to find this error’s cause ?

Here is my command line :

C:phpphp.exe C:/Users/me/AppData/Local/Temp/ide-phpunit.php --bootstrap C:UsersmePhpstormProjectsmyProjecttestsbootstrap.php --configuration C:UsersmePhpstormProjectsmyProjecttestsphpunit.xml C:UsersmePhpstormProjectsmyProjecttestsmyTests

And here is my phpunit.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="bootstrap.php" colors="true"
         cacheResult="false" testdox="true"
         displayDetailsOnTestsThatTriggerWarnings="true"
         cacheDirectory=".phpunit.cache" backupGlobals="true">
</phpunit>

My bootstrap file contains only a simple autoloader, and I’m on php 8.3.7 and phpUnit 11.1.3.

Doctrine does not want to assign `null` to boolean property

I have a new Symfony 7 application, that supports user accounts. The basic setup for this is very straightforward:

symfony new mimesia --version="7.1.*" --webapp
php bin/console make:user

The application has to talk to an existing database, which is mostly compatible with the scheme Symfony uses. However, the verified column of the existing data is called verified, rather than is_verified, and it can be NULL.

Solving this discrepancy should be easy enough, so I just extended the Doctrine annotations in Entity/User like so:

#[ORMColumn(name: 'verified', type: 'boolean', nullable: true)]
private bool $isVerified = false;

When I try to run the application, it runs into a server error:

Cannot assign null to property AppEntityUser::$isVerified of type bool

This makes no sense to me, because the nullable flag should have taken care of that. Is this a bug in the libraries, or am I missing something? Either way, how can we fix this?

Set the alternate image field when upload in the article

Based on the article here https://www.damiencarbery.com/2018/07/set-image-alt-field-on-upload-and-on-use/ I have the following code:

function dcwd_title_to_words( $title ) {
    // Sanitize the title:  remove hyphens, underscores & extra spaces:
    $title = preg_replace( '%s*[-_s]+s*%', ' ',  $title );

    // Sanitize the title:  capitalize first letter of every word (other letters lower case):
    $title = ucwords( strtolower( $title ) );

    return $title;
}

add_action( 'add_attachment', 'dcwd_set_image_meta_upon_image_upload' );
function dcwd_set_image_meta_upon_image_upload( $post_ID ) {
    if ( wp_attachment_is_image( $post_ID ) ) {
        $parent_id = wp_get_post_parent_id( $post_ID ); // Get the parent post ID
        $parent_title = get_the_title( $parent_id ); // Get the title of the parent post
        $parent_title = dcwd_title_to_words( $parent_title ); // Sanitize the title

        $my_image_title = $parent_title;

        $my_image_meta = array(
            'ID' => $post_ID,
            'post_title' => $my_image_title,
            'post_content' => $my_image_title,
        );

        update_post_meta( $post_ID, '_wp_attachment_image_alt', $my_image_title );
        wp_update_post( $my_image_meta );
    } 
}

add_filter('image_send_to_editor', 'dcwd_auto_alt_fix_1', 10, 2);
function dcwd_auto_alt_fix_1($html, $id) {
    $parent_id = wp_get_post_parent_id( $id );
    $parent_title = get_the_title( $parent_id );
    $parent_title = dcwd_title_to_words( $parent_title );

    return str_replace('alt=""','alt="' . $parent_title . '"',$html);
}

add_filter('wp_get_attachment_image_attributes', 'dcwd_auto_alt_fix_2', 10, 2);
function dcwd_auto_alt_fix_2($attributes, $attachment){
    if ( !isset( $attributes['alt'] ) || '' === $attributes['alt'] ) {
        $parent_id = wp_get_post_parent_id( $attachment->ID );
        $parent_title = get_the_title( $parent_id );
        $parent_title = dcwd_title_to_words( $parent_title );
        $attributes['alt'] = $parent_title;
    }
    return $attributes;
}

add_filter( 'post_thumbnail_html', 'meks_post_thumbnail_alt_change', 10, 5 );
function meks_post_thumbnail_alt_change( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
    $parent_title = get_the_title( $post_id );
    $html = preg_replace( '/(alt=")(.*?)(")/i', '$1'.esc_attr( $parent_title ).'$3', $html );
    return $html;
}

The code adds the title of the article to the title, alternative title and description of the image. Everything works perfectly if I have activated the classic editor (with the “Classic editor” plugin). If I use Gutenberg, instead of the title of the article, write “automatic draft” in all fields of the image. In Gutenberg, it adds the title of the article only if I save the article before loading the image, it does not add it without saving it first. Can you help me make it functional with Gutenberg as well?

Thank you in advance!

Problem with tailwind styling in blade component

I am trying to create a radio button where the background color changes depending on the option you select. But anytime I click on the first option the second option retains the background color. But the functionality of both options works perfectly well

This is the code block for the blade component

@props(['label', 'name'])

@php
$options = [
'Employer' => 'employer',
'Applicant' => 'applicant',
];
@endphp

<div class="flex border-2 border-teal-500 rounded-lg">
    @foreach ($options as $optionLabel => $optionValue)
    <input wire:model.live="{{ $name }}" type="radio" name="{{ $name }}" id="{{ $optionValue }}"
        value="{{ $optionValue }}" class="hidden peer">
    <label for="{{ $optionValue }}"
        class="flex-1 py-2 px-4 font-semibold cursor-pointer focus:outline-none peer-checked:bg-teal-500 peer-checked:text-white bg-white text-teal-500 transition-colors duration-200 {{ $loop->first ? 'border-r border-teal-500 rounded-l-md' : '' }} {{ $loop->last ? 'rounded-r-md' : '' }}">
        {{ $optionLabel }}
    </label>
    @endforeach
</div>

How to Replace the Default HTML of wp-login.php Page in WordPress Without Creating a Custom Login Page and Redirecting to It

I’m developing a WordPress plugin that aims to modify the HTML structure of the login page (wp-login.php), registration page (wp-login.php?action=register), and lost password page (wp-login.php?action=lostpassword).

My goal is NOT to create a custom login page and redirect to it. I want to directly replace the HTML of the default WordPress login pages with my own custom HTML, without relying on redirects.

I’ve tried using hooks like login_enqueue_scripts to inject CSS and JavaScript, but this doesn’t allow me to fully control the HTML structure.

Is there a way to achieve this?

I understand that directly modifying the HTML of core WordPress files is generally discouraged due to security and maintainability concerns. I’m open to any alternative solutions, even if they require a more complex approach.

I’m looking for any suggestions or pointers that might help me achieve this functionality.

Example:

Ideally, I’d like to replace the default WordPress login form with a custom form that has a different layout and additional fields.

Please note: I’m looking for solutions that do not involve creating custom login pages or redirecting users.

Any insights or code examples would be greatly appreciated.

Thank you!

WordPress: Add Checkbox to User Backend

Ihave the code from here and used it to create a checkbox in the user backend. This should show which members have paid. I can also change this checkbox directly in the user’s profile. But is there a way to change and apply this via the checkbox directly in the table. i.e. select a checkbox and that’s it? or also with an Apply button?

add_filter(
    'manage_users_columns',
    function( $columns ) {
        $columns['paid'] = 'Beitrag gezahlt';
        return $columns;
    }
);
add_filter( 'manage_users_custom_column', 'manage_users_custom_column_callback', 10, 3 );

function manage_users_custom_column_callback( $val, $column_name, $user_id ) {
    $checked = get_user_meta( $user_id, 'payment_status', true ) ? 'checked' : '';
    switch ( $column_name ) {
        case 'paid':
            return '<input type="checkbox" id="your_id" name="your_id" value="your_value" ' . $checked . '>';
        default:
    }
    return $val;
}
add_action( 'show_user_profile', 'add_custom_payment_checkbox_callback' );
add_action( 'personal_options_update', 'save_custom_payment_checkbox_callback' );
add_action( 'edit_user_profile', 'add_custom_payment_checkbox_callback' );
add_action( 'edit_user_profile_update', 'save_custom_payment_checkbox_callback' );

function add_custom_payment_checkbox_callback( $user ) {
    $user_id = $user->data->ID;
    $checked = get_user_meta( $user_id, 'payment_status', true ) ? 'checked' : '';
    printf(
        '
            <h3>%1$s</h3>
            <table class="form-table">
            <tr>
            <th><label for="Payment">%2$s</label></th>
            <td>
            <input type="checkbox" id="your_id" name="payment_status" value="your_value" ' . $checked . '>
            <br /><span class="description">%4$s</span>
            </td>
            </tr>
            </table>
            ',
        __( 'Extra Profile Information', 'locale' ),
        __( 'Beitrag gezahlt?', 'locale' ),
        esc_attr( get_user_meta( $user->ID, 'payment_status', true ) ),
        __( '', 'locale' )
    );
}

function save_custom_payment_checkbox_callback( $user_id ) {
    if ( ! current_user_can( 'edit_user', $user_id ) ) {
        return false;
    }
    
    $payment_status = ( isset( $_POST['payment_status'] ) ) ? 'paid' : '';
    update_user_meta( $user_id, 'payment_status', $payment_status);
}

Add this code to functions.php and test it.