Codeigniter: simple form function

Posted by Kevin Brown on Stack Overflow See other posts from Stack Overflow or by Kevin Brown
Published on 2010-05-07T19:09:13Z Indexed on 2010/05/07 19:18 UTC
Read the original article Hit count: 224

Filed under:
|

I'm stuck writing a simple form...I feel dumb.

Here's my controller:

function welcome_message(){
    //Update welcome message
    $id = $this->session->userdata('id');       
    $profile['welcome_message'] = $this->input->post('welcome_message');
    $this->db->update('be_user_profiles',$profile, array('user_id' => $id));
}

And the html:

<?php print form_open('home/welcome_message')?>
    <input type="checkbox" value="0" checked="false">Don't show me this again</input>
    <p>
        <input class="button submit" type="submit" class="close-box" value="Close" />
    </p>

<?php print form_close()?>

Edit I simply need it to submit to a private function and return to the home page (page submitted from).

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about beginner