codeigniter - codeginiter jquery post data clean url -


I am using codeiniter as a php framework and I want to do jquery post data in some of my ways .. The method has been declared in. For example, the Inbox Controller and its name were read:

  read public functions ($ data) {// $ Anything with data}  

I have this in my javascript code

  $ Post ('inbox / read', {somedatahere: value}, function .....);  

When I use this form, do I get this post URL www / inbox / read? Somedatahere = value has been found but I really wanted to be in this way ... Www / inbox / read / value ...

how i ths I can try to solve the problem, but not fancy ...

  $ .post ('Inbox / reading /' + value, {}, function .....) ;  

First of all, if you post jQuery , the data Not in the URL, but inside the request body.

  $ Post ('inbox / read', {url: value});  

You can access this data in your controller as follows:

 Read the  function () {$ url = $ this- & gt; Input-> ('Url'); }  

Ensure that you are loading the right helper and libraries I'm sure the assistant of the URL looks like which you have to load, but I'm not sure Working with codiginator


Comments