php while loop submit button
<pre><code>&lt;?php
    $sel22 = mysql_query("SELECT id1nev, id2nev, id2, accept FROM barat WHERE id1= '$kariidje' AND accept = '1' ") or die("CANNOT FETCH DATA FOR ADMIN " . mysql_error());
    if (mysql_num_rows($sel22) &gt; 0) {
        $i=0;
        while ($data22 = mysql_fetch_array($sel22)) {
            $i++;
          ?&gt;&lt;tr&gt;
                &lt;td&gt;
                    &lt;?php
                        include 'elemek/connection.php'; 
                        $idkitfogadel = $data22['id2'];
                        if(isset($_POST["submitelutasit"])){
                            $updatebaratt1 = "DELETE FROM barat WHERE id1 = $kariidje and id2 = $idkitfogadel";
                            mysql_query($updatebaratt1);
                        //header("Location: friends.php");  
                        }

                    ?&gt;

                    &lt;form id="form&lt;?php echo $i; ?&gt;" method="POST" action="#"&gt;
                        &lt;Button type="SUBMIT" name="submitelutasit" id="submitelutasit&lt;?php echo $i;?&gt;" value="!"/&gt;&lt;/button&gt;
                    &lt;/form&gt;
                &lt;/td&gt;
                &lt;td align="center"&gt;
                    &lt;a&gt;Something&lt;/a&gt;
                &lt;/td&gt;

            &lt;/tr&gt;
&lt;?php
}
</code></pre>

<p>This is my code in my page. The problem is if I press the button in any line its delete all my data and not only what i want. Each line each button when I press a button its delete that line where is it. This is what i want. I cant solve this problem (sad).</p>

<p>Thank you</p>