• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.