Welcome Guest, Not a member yet? Register   Sign In
Help with Update in CRUD.
#21

[eluser]HSKrustofsky[/eluser]
Don't know what to tell you. I put it at the end of the code. Went to the page, did everything, and it acted normally. Apart from not updating correctly, nothing else was unusual.
#22

[eluser]xeroblast[/eluser]
could you put it right after/below the if statement coz we want to see if there is really a data that to be updated.
#23

[eluser]HSKrustofsky[/eluser]
Okay, did it again and this is what I got:

Code:
Array ( [title] => UPDATE! )
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/CodeIgniter/application/controllers/admin.php:59)

Filename: helpers/url_helper.php

Line Number: 541

What I see up there is that it assigned UPDATE to the title. In fact I assigned that to the contents, and the title should say Title, but instead it has a 0 for contents and UPDATE for title.
#24

[eluser]xeroblast[/eluser]
then the problem is that the values in your field didnt go to the controller for evaluation... that is why it wont update coz its empty...
#25

[eluser]HSKrustofsky[/eluser]
First of all I have to apologize. I have done one of the stupidest things ever. I made a rookie developer mistake. The problem was in the views. For some stupid reason I in the for I decided to give the name of both input boxes 'title' instead of naming the other 'contents'. When I typed in the code for the first box, I just copied and pasted it for the second, and only changed the code for the value. I think this is why it was putting content info for the title. So once again I apologize, and thank you very much for al the help you gave me.
#26

[eluser]mjstenbe[/eluser]
Im working on a CRUD app as well. My problem is, that I'd like to create a delete function but sor security reasons I dont want to pass and fetch the deleted row ID via url. Is there another way to pass the ID from view to controlled?

Thanks,
Mika
#27

[eluser]xeroblast[/eluser]
use post data...




Theme © iAndrew 2016 - Forum software by © MyBB