Welcome Guest, Not a member yet? Register   Sign In
Suggestions Please For Library File
#1

[eluser]riwakawd[/eluser]
I would like to know what would be best way to be able to get my key column and my value column and have it so I could do something like

key would be example: item_keywords
value would be the content i.e. 'webdesign, movies' example
Code:
if (null !== ($this->input->post(some_key'))) {
  
   $data['some_key'] = $this->input->post('some_key');

} else {

// On view would display "content of value" selected from database.

   $data['some_key'] = $this->item->get('some_key');

}

I have these codes below but does not get the key and value.

Code:
private $data = array();

function __construct() {
   $this->CI =& get_instance();
}

public function get($key) {
   return (isset($this->CI->data[$key]) ? $this->CI->data[$key] : null);
}

public function set($key, $value) {
   $this->CI->data[$key] = $value;
}

public function has($key) {
   return isset($this->CI->data[$key]);
}

Any suggestions please.


Messages In This Thread
Suggestions Please For Library File - by El Forum - 08-31-2014, 09:10 PM
Suggestions Please For Library File - by El Forum - 08-31-2014, 10:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB