[eluser]noideawhattotypehere[/eluser]
[quote author="ricmen" date="1393253707"]Yes You are right that was the problem,
My code is something like this
Code:
$userInfo = $this->session->userdata("logged_in");
//here I have some validations with userinfo
if($_POST){
if($_POST["newContract"]){
$this->session->set_userdata("contract", $contract);
}else{
$contract = $this->sesion->userdata("contract");
}
Now I think that I have the problem of save all this in a new object.
do you know what would be the best approach for this?
Best Regards
[/quote]
not really related to topic but:
instead of doing x nested ifs, you can just do it like that
Code:
if ($this->input->post('newContract)) {
//what we do if we have post value
} else {
//what we do if we dont
}