enter image description here

here is a form, when adding a new group of indicators, a new record is added to the table and displayed together with the "change" button. How can I change the record opposite this button WITHOUT WRITING a SPECIFIC NUMBER

HERE CODE:

`<!DOCTYPE html> <html> <head> <link rel="stylesheet" href=""> <title></title> </head> <body> <div><h1>Π”ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Π½ΠΎΠ²ΠΎΠΉ Π³Ρ€ΡƒΠΏΠΏΡ‹ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€ΠΎΠ²</h1></div> <div class="SignUp"> <form action="indicator_group.php" method="POST" name="insert_indgroup"> <div class="container"> <input type="text" name="indicator_group_name" placeholder="Π’Π²Π΅Π΄ΠΈΡ‚Π΅ имя Π½ΠΎΠ²ΠΎΠΉ Π³Ρ€ΡƒΠΏΠΏΡ‹ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€ΠΎΠ²"> </div></br> <div class="container"> <button class="SubmitStyle" name="Add">Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ/ΠŸΠΎΠΊΠ°Π·Π°Ρ‚ΡŒ</button> </div> </form> </div> <?php include_once("Connectdb.php"); if(isset($_POST['Add'])) { if($_POST['indicator_group_name']!='') { $Name_Group=($_POST['indicator_group_name']); mysql_query("INSERT INTO indicator_group (indicator_group_name) VALUES ('$Name_Group')"); } echo"<table border=1>"; $query="SELECT * FROM indicator_group";// SQL-запрос $result=mysql_query($query); echo"<tr><th>Имя Π³Ρ€ΡƒΠΏΠΏΡ‹</th><th>Π Π΅Π΄Π°ΠΊΡ‚ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ</th></tr>"; while($row = mysql_fetch_array($result)) { echo"<form><tr><td>".$row['indicator_group_name']."</td><td>"."<button type='submit' formaction='indicator_group_edit.php' formmethod='POST' name='indicator_group_edit_button' value=".$row['indicator_group_id'].">Π˜Π·ΠΌΠ΅Π½ΠΈΡ‚ΡŒ</button>"."</td></tr>"."</form>"; } echo "</table>"; mysql_close(); } ?> </body> </html>` 

Here I add the data to the table called "indicator_group" and immediately output the result of the addition. I go to the handler page "indicator_group_edit.php" and do not know how to add through another form as described above, I need to add an entry to the table without specifying the ID number. Please help if anyone knows how to do it.

  • You were mistaken for a year, it was β€œfashionable” to write in the 80s. I did not understand the essence, but without an ID or other unique information, it is impossible to delete a point. - user207618
  • I'm just starting to learn this language and maybe I can be wrong. The essence of the program, I need to add the name of a specific group to the phpmyadmin database. The data is added everything works except for changing the record, how can I change the record? - Green Arrow

0