why $_GET not working with me ? - 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: why $_GET not working with me ? (/showthread.php?tid=54645) Pages:
1
2
|
why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]Fahad Alrahbi[/eluser] hello guys im Fahad again I'm sorry for the inconvenience but really i like Codeigniter , when I am trying to use $_GET i don't know why it's not working My Controller Code: function where_id($id){ URL where_id/id/22 it showing No Thing i want 2 print 22 why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]CroNiX[/eluser] Query strings are disabled by default. Did you enable them? why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]Fahad Alrahbi[/eluser] Hello , Yes Code: $config['enable_query_strings'] = TRUE; why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]TWP Marketing[/eluser] If your using query strings, shouldn't the url be: Code: ...where_id?id=22 why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]CroNiX[/eluser] But you're not using a query string in your url. Like ?something=some_value;&something_else=some_other_value why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]Fahad Alrahbi[/eluser] if i use http://localhost/cic/showq/where_id?id=22 it showing Quote:A PHP Error was encountered why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]TWP Marketing[/eluser] You are trying to mix CI segmented URL with query string URL's From the User Guide: [EDIT] http://ellislab.com/codeigniter/user-guide/general/urls.html Quote:Enabling Query Strings why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]Fahad Alrahbi[/eluser] [quote author="TWP Marketing" date="1347989989"]You are trying to mix CI segmented URL with query string URL's From the User Guide: [EDIT] http://ellislab.com/codeigniter/user-guide/general/urls.html Quote:Enabling Query Strings[/quote] I'm sorry but I do not understand it well Can you explain me the difference between them with example in my code why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]TWP Marketing[/eluser] if your controller, method and id are: c = showq m = where_id id = 22 Then your url would be: Code: http://localhost/cic?c=showq?m=where_id?id=22 [EDIT] If you have not removed index.php from the url, then you need to use this: Code: http://localhost/cic/index.php?c=showq?m=where_id?id=22 why $_GET not working with me ? - El Forum - 09-18-2012 [eluser]Fahad Alrahbi[/eluser] i remove index.php Code: RewriteEngine on and when itry http://localhost/cic/?c=showq?m=where_id?id=22 it showing Quote:The page you requested was not found. can i use this link showq/where_id/id/22 ? if yes how ? |