multiple UPDATE function, php sql, only updates last function -


I have a problem with my update function on php, I have the code to work the function that it only ever How does the last action update

    Input Name =" Stock_1 "Type =" Text "ID =" Stock_1 ">  & lt; & lt; ; / Tr> & lt; tr & gt; & lt; td width = "100" & gt; Samsung 2.5 "SATA Hard Drive & lt; / Td> & Lt; Td> & Lt; Input name = "stock_2" type = "article" id = "stock_2" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD width = "100" & gt; 8gb Kingston DDR3 RAM 1333 MHG & lt; / TD & gt; & Lt; Td> & Lt; Input name = "stock_3" type = "text" id = "stock_3" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "100" & gt; Apple MacBook Ram 8 GB & lt; / Td> & Lt; Td> & Lt; Input name = "stock_4" type = "article" id = "stock_4" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "100" & gt; Gigabyte GA-970A-DS3 & lt; / Td> & Lt; Td> & Lt; Input name = "stock_5" type = "text" id = "stock_5" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "100" & gt; Asus P8Z77-V PRO & lt; / Td> & Lt; Td> & Lt; Input name = "stock_6" type = "text" id = "stock_6" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "100" & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "100" & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Input name = "update" type = "submit" id = "update" value = "update" & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Form & gt; & Lt ;? Php}? & Gt; & Lt; / Body & gt; & Lt; / Html & gt;   

My code and IM are struggling to see why it does not update them all? Obviously I put the correct username and password!

Any help would be greatly appreciated.

Why do not you do that? ($ I = 1; $ i & lt; = 6; ++ $ i) {$ {'stock_' for

  $ I} = $ _POST ['stock_'. $ I]; $ Sql ​​= "Update products SET instock =". $ {'Stock_'. $ I} "WHERE productid =". $ I; $ Revualcle = misc_query ($ sql, $ conn); ($ I = 1; $ i & lt; = 6; ++ $ i) for {$ var} // ...}   

or just

  = $ _POST ['stock_'. $ I]; $ Sql ​​= "Update Product SET instock =". $ Var "Manufacturer =". $ I; $ Revualcle = misc_query ($ sql, $ conn); // ...}    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -