Update/Edit entered data from database - servlet

后端 未结 1 1921
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-29 12:13

I have prepared a form for inserting, viewing and deleting data and now I want to add option to edit that data but either I am following wrong way to do it or I dont know how to

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-29 12:34

    firstly on the page HTML page create one hidden field to identify which operation you want to perform initially its value should be blank and based on click whether insert update or delete assign some unique values to all the available operations.and from your servlets get that field as req.getParameter("")and based on that put your code in respective if and else if block so that only that code will run. hope this will help

    0 讨论(0)
提交回复
热议问题