![]() |
Need help on URL and search - 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: Need help on URL and search (/showthread.php?tid=9926) |
Need help on URL and search - El Forum - 07-13-2008 [eluser]cbmeeks[/eluser] I'm looking to run a small search engine on my site. Anyway, I want the user to simply type some words in a search box and click submit. The action form is set to GET instead of POST. This makes the URL look like: example.com/search/q?search=amiga+computers My problem is that I can't seem to get my function "q" that is in my "search" controller to grab the search string "amiga+computers". I imagine it's because I don't have query strings enabled. I would settle for something like: example.com/search/q/amiga+computers But how do I get my input html to send the data like that? Is URL routing my answer? Thanks! Need help on URL and search - El Forum - 07-13-2008 [eluser]marcoss[/eluser] In your config, enable query strings and set the default uri protocol to "PATH_INFO", like this: Code: $config['enable_query_strings'] = TRUE; That way you can use both, segment based uri and query strings without "hacking" CI. Need help on URL and search - El Forum - 07-13-2008 [eluser]cbmeeks[/eluser] You are my hero. You CI guys rock. I will remember you all when I get rich for my web idea. You see, I am writing a killer website that monitors the mood swing of cats while streaming the results to Twitter. I wear flip-flops and come into work at 2:30pm. HAHAHA Seriously, thanks again. cbmeeks Need help on URL and search - El Forum - 07-13-2008 [eluser]marcoss[/eluser] Ok, in that case I'll save this post to claim my 10% of the company once you go public ![]() Need help on URL and search - El Forum - 07-13-2008 [eluser]cbmeeks[/eluser] lol. I actually hope to release something this week. CI has literally made it a possibility to release version 0.001 of my "product" in a weekend's worth of time. I will announce it on the forums later. It's nothing fancy. Just a simple search engine based on BOSS. More of an experiment than anything else. cbmeeks |