edit mysql table with php -


I'm missing something and I need some help!

Creates a table with the code editing field below. When I edit the fields, this data sends the data to my editing page which will run an updated script. But when I press the update button on any line, it sends every record in the loop. How can I limit the record which I have chosen to update?

Thank you for your help!

  $ sitequery = "SELECT *" like the WHERE address with the meter data '% $ site%' by the order 'alias + 0 "; $ Siteresult = mysqli_query ($ connection, $ sitecorruption); Echo "& form; form action = 'editmeter.php' method = 'get' & gt;"; $ Resultstring = '& lt; Table class = "table-table-hover"> gt; $ Resultstring = '& Lt; Tr & gt; '; $ Resultstring = '& Lt; Th & gt; Apartment & lt; / Th> '; $ resultstring = '& Lt; Th & gt; Address & lt; / Th> '; $ Resultstring = '& Lt; By & gt; Suburb & lt; / Th> '; $ Resultstring = '& Lt; Th & gt; Meter & lt; / Th> '; $ Resultstring = '& Lt; Th & gt; Meter lotion & lt; / Th> '; $ Resultstring = '& Lt; Th & gt; Type & lt; / Th> '; $ Resultstring = '& Lt; Th & gt; Units & lt; / Th> '; $ Resultstring = '& Lt; Th & gt; Get started & lt; / Th> '; $ Resultstring = '& Lt; By & gt; Reading date & lt; / Th> '; $ Resultstring = '& Lt; Th & gt; Waveflow & lt; / Th> '; $ resultstring = '& Lt; By & gt; Status & lt; / Th> '; $ Resultstring = '& Lt; By & gt; Notes & lt; / Th> '; $ resultstring = '& Lt; / tr & gt; '; While ($ data = mysqli_fetch_assoc ($ citrate)) {$ resultstring = "& Lt; tr & gt;"; $ Resultstring = "& Lt; td & gt; & lt; input type = 'text' value = '$ data [apart_num]' name = 'separate' name = 'isolated' ; $ Resultstring = "& Lt; td> $ data [address] "; $ Resultstring = "& Lt; td> $ data [suburbs] "; $ Resultstring = "& Lt; td & gt; & lt; input type = 'text' value = '$ data [meter_cierial]' name = 'serial' & gt; & lt; / td & gt;"; $ Resultstring = "& Lt; td> $ data [meter_space] & lt; / td & gt;"; $ Resultstring = "& Lt; td & gt; & lt; input type = 'text' value = '$ data [meter_type]' name = 'type' & gt; & lt; / td & gt;"; $ Resultstring = "& Lt; td> Input    

I recommend that you add a hidden field with an id value You can set WHERE item_id = $ item_id in your update query, which can be unique to the item being updated, and then

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -