CodeIgniter Forums
SOLVED:I need my URL to handle "=" , Help! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: SOLVED:I need my URL to handle "=" , Help! (/thread-30812.html)



SOLVED:I need my URL to handle "=" , Help! - El Forum - 05-26-2010

[eluser]pokerking[/eluser]
Ok i am trying to pass some strings in URL

http://localhost/welcome/getPerson/fname='alex'

i want to get all person with alex with above syntax.

My $_GET array only show up to welcome/getperson/fname

I want fname='alex' as single string.

How do i get it to work?

Thanks in advance.


SOLVED:I need my URL to handle "=" , Help! - El Forum - 05-26-2010

[eluser]pokerking[/eluser]
I solved it by allowing & as permissable character

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-=&';

Then start the string with &
http://localhost/welcome/getPerson/filter/&fname=alex&lname=yahoo/

So i get filter=&fname=alex&lname=yahoo

I parse them for further processing.

Also it may also available in $_GET i think.

$name=$_Get['name'];

This way i have segmentation for methods and query strings for some data passing or i have to write many segmentation.
http://localhost/welcome/getPerson/output/json/filter/&fname=ss aa&op=AND&lname=john/sort/fname/seq/asc/groupby/address