500 internal server error codeigniter ajax post

What happens if you mock up a noddy form with those fields and post it to the Save action on the controller? Next question is the usual stuff but. As per your post the requested URL is wrong as if it' s on localhost it should be like : 0. 1/ posts/ ajax_ controller/ del_ post. ajax_ controller/ del_ post. Try setting your base_ url in config. up vote 2 down vote. In Codeigniter if you have csrf_ protection activated in config it will return Error 500! To solve this you have to send the csrf value. ajax( { type: " POST", url: com",.

  • Xml error outlook 2007
  • Stop error 7b new motherboard
  • Win32 error code 1114
  • Custom 404 error page in codeigniter

  • Video:Codeigniter internal server

    Server ajax post

    customer/ product/ import", / / Server script to process data type: " POST", data: { ' csrf_ token_ name' : cct }. Possible duplicate of Codeigniter csrf token with ajax request ( 500 internal server error) – AdrienXL Feb 23 ' 16. public function candidate_ process( ) { # to check all inputs are comming. print_ r( $ _ POST) ; }. if above code shows all the data then, use the rest of codes. share| improve this answer. answered Mar 6 ' 17 at 8: 42. I have a problem to sending data with ajax, when i click button save to sending data to database. but when i push F12 the. POST manufacture/ addmanufacture 500 ( Internal Server Error) send. Try with url: " / testingAjax/ getSomething". For ajax call default method is GET and you didn' t post any form or any value to server, just making ajax call on button click that' s why it may works!

    when you changed method type. Your function needs a parameter, however you' re not sending it properly unless your variable unit_ id contains a slash /. var post_ url = " getruangan" + unit_ id; / / Output: getruangan55. Since you are using POST there is no need to send it as url. But I keep getting a 500 Internal Server Error? com/ ajax- csrf- protection- codeigniter- 20 · com/ forums/ viewthread/ 176318/. Then basic CI debugging start with log_ message: call log_ message( ' DEBUG', $ this- > input- > post( ' obj' ) ) ; followed by log_ message( ' DEBUG',.