I have created a Table to insert the data of Books, the values of which are taken from a form. Now I wanted to perform the CRUD operations. But I was having problems with updating the data. Instead of replacing the old data, the entered data is taken as a new entry. What must I do?

What I did was as follows :

> 
> 
> > 
> > I have created a link on the homepage which redirects to a page where it shows the list of books and their details which can be entered through another link for adding books. The Book\_ID has been taken as the Primary Key for the library table.
> > 
> > 
> > Now in the page where it shows the list, I have added an "EDIT" and a "DELETE" button. The Delete button works fine as the syntax is direct and simple. But for the Edit Button, which redirects to the Add Books Page but the form is autofilled with the particular data using $Book\_ID=$B$this->->uri->segments[3]; which I have sent to the base\_model to retrieve data from that particular row with that particular Book\_ID.
> > 
> > 
> > Now the problem am having is that after editing the data, I have put a tag ...but am not pretty much sure whether I have to do this..I was told that it must be there. But the fact that I actually must send the Book\_ID back to the controller and that should be sent to the model where it uses that particular id to update data in that row. Am really confused!
> > 
> > 
> > 
> 
> 
>