Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] ?q=something url like
#1

[eluser]atno[/eluser]
Hi all,

How can i make codeigniter read the "?q=view_records" part of the following url and run a function?

http://localhost/~atno/index.php/admin?q=view_records

Thanks,
Atno
#2

[eluser]Phil Sturgeon[/eluser]
[SOLVED] How to use URI Segments and Query Strings in the same project.
#3

[eluser]atno[/eluser]
[quote author="pyromaniac" date="1232390438"][SOLVED] How to use URI Segments and Query Strings in the same project.[/quote]


aargh,

thanks a lot pyro Big Grin


atno
#4

[eluser]Sarfaraz Momin[/eluser]
Well there are a few changes in the config which would allow you to achieve the following results.

Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?';
$config['enable_query_strings'] = TRUE;

The querystrings cannot be accessed using $_GET. You would have to parse them as URI segment. Something like below.

http://localhost/~atno/index.php/admin/?q=view_records

Have a good day !!!
#5

[eluser]atno[/eluser]
[quote author="Sarfaraz Momin" date="1232390609"]Well there are a few changes in the config which would allow you to achieve the following results.

Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?';
$config['enable_query_strings'] = TRUE;

The querystrings cannot be accessed using $_GET. You would have to parse them as URI segment. Something like below.

http://localhost/~atno/index.php/admin/?q=view_records

Have a good day !!![/quote]

thanks a lot Sarfaraz

atno




Theme © iAndrew 2016 - Forum software by © MyBB