Welcome Guest, Not a member yet? Register   Sign In
$_GET + Nice URLs ??!??
#11

[eluser]mistress_shiira[/eluser]
[quote author="llbbl" date="1194600203"]use the URI class:
http://ellislab.com/codeigniter/user-gui...s/uri.html

results in:
<a href=’editcampaign/CID/$campaign_ID’>$campaign_name</a>[/quote]

if its not too much too ask,do you have any code samples that does that?
#12

[eluser]llbbl[/eluser]
I think you expect the forums to do your entire project for you ><

I edited my previous post, maybe that will help.

Using sessions is not the best solution for what you are trying to do. I think your still a little fuzzy on how CI works and everything.
#13

[eluser]mistress_shiira[/eluser]
a follow up question: so editcampaign.php is a view file right?
so if i have the link like this already in my query result:
Quote:<a href=’editcampaign/CID/$campaign_ID’>$campaign_name</a>
it would automatically direct to my editcampaign view file?no controller for that?
#14

[eluser]mistress_shiira[/eluser]
[quote author="llbbl" date="1194600481"]I think you expect the forums to do your entire project for you ><

I edited my previous post, maybe that will help.[/quote]
actually,im not.im sorry if it looks like that to you.actually,its not a project at all.more of like an exercise just to get the feel of CI.
#15

[eluser]llbbl[/eluser]
[quote author="mistress_shiira" date="1194600484"]a follow up question: so editcampaign.php is a view file right?
so if i have the link like this already in my query result:
Quote:<a href=’editcampaign/CID/$campaign_ID’>$campaign_name</a>
it would automatically direct to my editcampaign view file?no controller for that?[/quote]

editcampaign.php is not a file you can access via the web directly. for instance example.com/editcampaign.php. It is either a controller or a view file, maybe there are two files with the same name...

only controllers can be accessed via a web browser. example.com/editcampaign/ that is a controller, a class, a file located in the controllers folder.
#16

[eluser]mistress_shiira[/eluser]
[quote author="llbbl" date="1194600203"]use the URI class:
http://ellislab.com/codeigniter/user-gui...s/uri.html

results in:
<a href=’editcampaign/CID/$campaign_ID’>$campaign_name</a>

You can't use GET in normal way with CI because of the MVC configuration with everything being a class passed through index.php.

editcampaign would be your class
CID would be a function within the class
using URI class you can pull the campaign_id from the url

get it now? you should really spend some time reading the user guide. Smile[/quote]

yeah i think i get the idea now.maybe ur right.i should spend some time looking at the user guide.i admit though im not really got at reading stuff,i prefer to code it and solve problems as i encounter them on the way.hehehe anyways thanks a lot for the help!
#17

[eluser]mistress_shiira[/eluser]
sorry for being so persistent,i just need to be clarified on this.i have a model where i do all the queries and all.well one function inside the model retrieves the values from the db using a manual query.it needs a parameter ID since it retrieves only the values with the specific ID.
so my question is,from my controller,i should pull out the value for the ID and pass it as a parameter when i call the model right?or am i totally out of track here?
#18

[eluser]gtech[/eluser]
yes thats exactly the way to do it.




Theme © iAndrew 2016 - Forum software by © MyBB