Welcome Guest, Not a member yet? Register   Sign In
problem with refresh data
#7

[eluser]cipherz[/eluser]
<?php

class Member extends Controller {

var $folder = 'member/';
function Member ()
{
parent::Controller();
}

function index()
{
$this->load->model('Member');
$data['list'] = $this->Member->list();
$main['content'] = $this->load->view($this->folder.'index', $data, true);
$this->load->view($this->folder.'layout', $main);
}

function create()
{
$main['content'] = $this->load->view($this->folder.'create', array(), true);
$this->load->view($this->folder.'layout', $main);
}

function do_create_item()
{
$this->load->model('Member');
$data['firstname'] = $this->input->post('firstname');
$data['lastname'] = $this->input->post('lastname');

$this->Member->create($data);
redirect($this->folder.'index');
}
}

index page - list all members
create page - form to input data : firstname and lastname and save button
do_create_item - action to insert member to database

once press save button it redirect to index page but the new record doesnt show up i do have to press refresh button bfore the item appear.


Messages In This Thread
problem with refresh data - by El Forum - 08-21-2010, 09:39 AM
problem with refresh data - by El Forum - 08-21-2010, 01:46 PM
problem with refresh data - by El Forum - 08-22-2010, 08:28 AM
problem with refresh data - by El Forum - 08-22-2010, 10:02 AM
problem with refresh data - by El Forum - 08-22-2010, 11:04 AM
problem with refresh data - by El Forum - 08-22-2010, 12:46 PM
problem with refresh data - by El Forum - 08-23-2010, 12:39 AM
problem with refresh data - by El Forum - 08-24-2010, 12:07 AM
problem with refresh data - by El Forum - 08-25-2010, 12:06 PM
problem with refresh data - by El Forum - 08-25-2010, 01:01 PM
problem with refresh data - by El Forum - 08-26-2010, 12:40 AM
problem with refresh data - by El Forum - 08-26-2010, 03:10 AM
problem with refresh data - by El Forum - 08-26-2010, 11:41 PM
problem with refresh data - by El Forum - 08-27-2010, 05:53 AM
problem with refresh data - by El Forum - 08-27-2010, 09:34 AM
problem with refresh data - by El Forum - 08-27-2010, 11:16 AM
problem with refresh data - by El Forum - 08-31-2010, 11:46 AM
problem with refresh data - by El Forum - 08-31-2010, 02:27 PM
problem with refresh data - by El Forum - 08-31-2010, 07:41 PM
problem with refresh data - by El Forum - 09-02-2010, 04:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB