Welcome Guest, Not a member yet? Register   Sign In
What's Broken?
#1

[eluser]Bionicjoe[/eluser]
I changed something awhile back & I guess I didn't test it. Now I can't fix whatever I changed?

Trying to insert a record.
I get error
Quote:Message: Undefined index: addupdate
Filename: controllers/outage.php

NOTE: If I uncomment the redirect I'll see the error & the page redirects quickly with the update inserted into the DB. But why the error?

Code:
function addupdate() {
      //Submit an update to the 'UPDATES' table.
      $id = $this->uri->segment(3);
      $this->load->model('outage_model','',TRUE);
      $this->outage_model->addupdate($_POST['addupdate'], $_POST);
      $link = array('outage/editoutage', $_POST['outageid']);
    //redirect($link,'refresh');
  }

Model
Code:
function addupdate($id, $data)
    // Update one outage record
    {
      $this->db->where('outageid', $id);
      $this->db->insert('updates', $data);
    }


Messages In This Thread
What's Broken? - by El Forum - 09-01-2010, 05:48 AM
What's Broken? - by El Forum - 09-01-2010, 06:00 AM
What's Broken? - by El Forum - 09-01-2010, 06:01 AM
What's Broken? - by El Forum - 09-01-2010, 06:02 AM
What's Broken? - by El Forum - 09-01-2010, 06:20 AM
What's Broken? - by El Forum - 09-01-2010, 06:46 AM
What's Broken? - by El Forum - 09-01-2010, 07:39 AM
What's Broken? - by El Forum - 09-01-2010, 07:58 AM
What's Broken? - by El Forum - 09-01-2010, 11:09 PM
What's Broken? - by El Forum - 09-02-2010, 02:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB