Welcome Guest, Not a member yet? Register   Sign In
MVC and post values
#1

[eluser]philfry[/eluser]
Does the model have access to the post values from dropdowns? Or is this something only the controller has access to? Basically i have each dropdown set to a value and then that value needs to be passed into a database query. What is the best way to accomplish this?

Thanks!
#2

[eluser]boxyee[/eluser]
You could pass the post variables as parameters when calling the function:

Code:
$this->nameofmodel->nameoffunction($variable);
then in the model:
Code:
function($variable)
{
$this->db->where ('id', $variable)
}

Hope that helps




Theme © iAndrew 2016 - Forum software by © MyBB