CodeIgniter Forums
passing a lot of data via uri segments - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: passing a lot of data via uri segments (/showthread.php?tid=10492)



passing a lot of data via uri segments - El Forum - 08-01-2008

[eluser]spherop[/eluser]
newbie to ci and still learning the ropes ...

i have some jquery/javascript code that will insert data in the db by ajax request.

in the form data are many fields including [artistname, genre, url, description] etc.

is the standard uri segment approach used in a case like this typically?

in this case the user will not see the url as it will be ajax, but i am wondering what people do when they don't want a huge ugly url from a lot of data being passed in?

what kind of encoding decoding needs to be done to prevent (using a url as example) "/"'s or other characters from messing up the uri segments?

love some guidance or pointers ...


passing a lot of data via uri segments - El Forum - 08-01-2008

[eluser]Colin Williams[/eluser]
Your dealing with data transfer, so your going to want to make a POST request, not GET. Then, all your data can be accessed by $this->input->post('key')


passing a lot of data via uri segments - El Forum - 08-01-2008

[eluser]spherop[/eluser]
lol ...
i was just coming back to post that i realized as much! ... don't know what i was thinking ...but thanks anyways!


passing a lot of data via uri segments - El Forum - 08-01-2008

[eluser]Colin Williams[/eluser]
You're not the first one I've seen do this on these forums! ;-P


passing a lot of data via uri segments - El Forum - 08-01-2008

[eluser]spherop[/eluser]
well there's the great zen law of "you cannot figure it out for yourself until you post a question"...Wink