Welcome Guest, Not a member yet? Register   Sign In
Problem with application after moving from local to hosting server
#12

[eluser]vitoco[/eluser]
Try this

Code:
// ERROR REPORTING
        error_reporting( E_ALL );
        // IS THIS NECCESARY ???
        $this->order = $this->session->userdata('order'); //saving order content to the array ..???
        
        if(isset($_POST['submitted']))
        {
            //
            $order_array = $this->session->userdata('order');

            foreach($this->input->post('qty') as $k => $v)
            {
                $id = (int)$k;
                $qty_ = (int)$v;
                
                if ( ($qty_ == 0) OR ($qty_ < 0) )
                {
                    // delete product if exists
                    if( isset( $order_array[$id] ) )
                    {
                        unset( $order_array[$id] );
                    }
                }
                else
                {
                    //
                    $order_array[$id] = $qty_;    
                }
            }
            //
            $this->session->set_userdata('order', $order_array );
        }


Messages In This Thread
Problem with application after moving from local to hosting server - by El Forum - 05-22-2010, 08:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB