![]() |
Interrelational results in several pages - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Interrelational results in several pages (/showthread.php?tid=5626) |
Interrelational results in several pages - El Forum - 01-29-2008 [eluser]agartzia[/eluser] Hi! I'm coding a large application that uses several tables with all the information interrelated. From a table I take several values, and some of them can point to another table. For example, the table USERS has a field like "range" where it's set the range id. With this id I can check out the table RANGES and find out what the user can and can not do. This is all set in several pages (users.php, ranges.php...). All pages have their own search methods. I used to link the range value to the ranges.php page, so anyone could click the link and look at the result in the ranges.php page, like this Code: <a href="ranges.php?search[id_range]=<?=$data['range'];?>"><?=$data['range'];?></a> Now I'm using CI and I'm trying to make some similar, but GET is disabled and I would like to keep it that way. How can I manage to inter-relationate pages with simple links? Thanks! Interrelational results in several pages - El Forum - 01-29-2008 [eluser]xwero[/eluser] Code: <a href="<?php echo site_url('ranges/search[id_range]/'.$data['range']); ?>"><?=$data['range'];?></a> Interrelational results in several pages - El Forum - 01-29-2008 [eluser]agartzia[/eluser] Is there a way not to code another function? Just want to make a search, but with no form submitting, just from page to page. Interrelational results in several pages - El Forum - 01-29-2008 [eluser]xwero[/eluser] the site_url function just builds an absolute url. Interrelational results in several pages - El Forum - 01-29-2008 [eluser]agartzia[/eluser] [quote author="xwero" date="1201617036"]the site_url function just builds an absolute url.[/quote] Well, I know that. What I'm trying to mean is that solution doesn't fit, because - I would need to code again the function "range" to take search values as a param (which I think is a wrong idea) - Some security flaw... What I need to do is submiting a search from another page, or another solution that may came up to accomplish it. I've thought of javascript and redirecting, but it doesn't look very professional... Interrelational results in several pages - El Forum - 01-29-2008 [eluser]agartzia[/eluser] I'll try to explain it further... My search fields names are this easy: search[field]. So I only collect once $search and I got all the values in the array. The problem goes when, instead of making a form-submit search, I try to make a search from a link. Noone's a similar question? Interrelational results in several pages - El Forum - 01-29-2008 [eluser]xwero[/eluser] you mean something like this, search field input "me myself and i" which generates links to search "me", "myself", "i"? Interrelational results in several pages - El Forum - 02-04-2008 [eluser]agartzia[/eluser] Hi xwero. Nop, an example search form: Code: <? So you can search for any users in any way, this easy. If you want a user called Jimmy from a domain like @foo.com, you can submit a search like "Jimmy" and "@foo.com" in their respective fields. BUT I need to use the search engine in order to show some users. For example, in a statics page I may show "There's 9 users from @foo.com" and I should be able to click and see all that 9 users. Before starting with CI, I used to made a link to "users.php?search[mail_user]=foo.com" and it generated the search, showing the 9 users. This example only uses one field, but I could be up to 15 fields. Sorry for the long text! |