将表格行发送到下一页

Im trying to make a simpel webshop where I list some items (to order) on each row there is a form field for tell how many the costumer wants of the item. Then she submit a button and the action is another page where the item will be added to an MYSQL table to be processed later Im thinkking that when user hit the submit there is a hidden field that send the itemid.

I need to get a way to make the itemid with me to the other side but I cant make the variable specific for the row. the ArtikelNR variable $row["ArtikelNr"] shoudld be assigned to the hidden form and be accessable on next page as ArtikelNr = $_REQUEST['ArtikelNr']; and it works so far but it always the laast item number not the itemnumber that i specific for the choosen row. How do I make $form4 = ' '; row speciific so i can catch it on next page and add it to the basket.

<?php include 'databas_connect.inc'; ?>
<?php
$sql = "SELECT `ArtikelNr`, `ArtikelNamn`, `Storlek`, `ArtikelPris`,  
 `artikelbild`FROM `artiklar` ";
$result = $conn->query($sql);
if ($result->num_rows > 0)
{
    echo "<table><tr><th>Antal</th><th>ArtikelNr</th><th> ArtikelNamn</th>
<th>Storlek</th><th>ArtikelPris</th><th>Artikelbild</th></tr>";
    // output data of each row
    while($row = $result->fetch_assoc())
    {
        $number =1;
        $artnr  = $row["ArtikelNr"];
        $prefix = "pre_";
        $sufix = 1;
        ${$prefix .$sufix} =$row["ArtikelNr"] ;
        $form1 = '<form action="sida61.php" method="post">';
        $form2 = '<label for="antal"></label>';
        $form3 = '<input type="text" name="antal" size="2" maxlength="2"value="1" id="antal">';
        $form4 = '<input type="hidden" name="ArtikelNr" value="'.${$prefix .$sufix}.'"/> ';
        $form5 = '<input type="submit" name="btn_submit" value="KÖP" />';
        $form6 = '</form>';
        $form = $form1 . $form2 . $form3 . $form4 . $form5 ;
        $img =  "<img src=./img/>";
        $image=$row['artikelbild'];
        $path ="<img src='./img/".$image."' />";

        echo "<tr><td>" .$form. "</td><td>" . $row["ArtikelNr"]. "</td><td>" . 
        $row["ArtikelNamn"]. " </td><td> " . $row["Storlek"]. " </td><td>" . 
        $row["ArtikelPris"].  " </td><td>".$path."</td></tr>";
        ++$sufix;
    }
    echo "</table>";
} else {
    echo "0 results";
}     
$conn->close();
?> 

here is code for sida61.php

<?php include 'databas_connect.inc'; ?>
<?php
    session_start();
    $ArtikelNr = $_REQUEST['ArtikelNr'];
    $antal     = $_REQUEST['antal'];
    //$KundNr  = $_SESSION["Kund"];
    // attempt insert query execution
    $sql = "INSERT INTO `kundkorg`( `ArtikelNr`, `antal`, `KundNr`) 
                  VALUES (1,$antal, 2)";
    if(mysqli_query($conn, $sql)){
        print_r($_REQUEST);  // I just do this to se value of $_REQUEST it is always 8 since I have 8 items i dont know why
    } 
    else
    {
        echo "ERROR: Could not able to execute $sql. " . 
        mysqli_error($conn);
    }
    // close connection
    mysqli_close($conn);
    //header("Location: 6.php");
?>

Not sure why you were attempting to add a prefix and a suffix as you say you want to pass just the $row["ArtikelNr"] in your hidden field.

You also missed concatenating your </form> closing tag into your $form variable.

So this code should achieve what you want.

while($row = $result->fetch_assoc()) {

    $form .= '<form action="sida61.php" method="post">';
    $form .= '<label for="antal"></label>';
    $form .= '<input type="text" name="antal" size="2" maxlength="2"value="1" id="antal">';

    $form .= "<input type='hidden' name='ArtikelNr' value='{$row['ArtikelNr']}'/>";
    $form .= '<input type="submit" name="btn_submit" value="KÖP" />';
    $form .= '</form>';

    $img =  "<img src='./img/{$row['artikelbild']}'/>";

    echo "<tr><td>$form</td><td>{$row['ArtikelNr']}</td><td>
            {$row['ArtikelNamn']}</td><td>{$row['Storlek']}</td><td>
            {$row['ArtikelPris']</td><td>$path</td></tr>";
}

Yes I se now I missed to missed concatenating your closing tag into $form variable. the correct code is

$form1 = '<form action="sida61.php"  method="post">';
$form2 = '<label for="antal"></label>';
$form3 = '<input type="text" name="antal" size="2" maxlength="2"value="1" 
 id="antal">';
$form4 = '<input type="hidden" name="ArtikelNr" value="'. 
 $row["ArtikelNr"].'"/> ';
$form5 = '<input type="submit" name="btn_submit" value="KÖP" />';
$form6 = '</form>';
$form = $form1 . $form2 . $form3 . $form4 . $form5 . $form6 ;

Thanks so much @RiggsFolly

When I tried your code it added a new form on each row making me have 9 input fields on row 9. but You helped me anyway!!