虽然只显示了一个结果

I've got this code:

<?php
    include("config.php"); // mysql connect and mysql(i) filter sanitize

     $cislonakupus=$_GET['cislonakupu'];
     $su=mysql_query("SELECT * FROM `count_size` WHERE `cislonakupu`='$cislonakupus'");

     while ($row=mysql_fetch_array($su)) {
            $pid1=$row['idproduktu'];
            $s9=$row['S'];
            echo $s9;
            die();
     }
?>

And my table have two records, as shown below.

[DATABASE]

Table "count_size"

cislonakupu= 123 , S = 1

cislonakupu= 123 , S = 2

echo only prints out the first record S as 1, and does not display the second record with S as 2.

Why is that so?

You clearly say die() which terminates your program.

Move die(); outside the while loop

You have a die in the loop

<?php
    include("config.php"); // mysql connect and mysql(i) filter sanitize

$cislonakupus=$_GET['cislonakupu'];
$su=mysql_query("SELECT * FROM `count_size` WHERE `cislonakupu`='$cislonakupus'");
        while ($row=mysql_fetch_array($su)) {
            $pid1=$row['idproduktu'];
    $s9=$row['S'];
            echo $s9;
            die(); // Remove this, it stops the script
}
?>