• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print message in lightbox after submit

Dear all,
I am creating change password functionality in a lightbox. the only thing now that is left is intimating the user where his/her password is changed or not. i am not able to persist that lightbox after submit and flash the relative message to the user

how can i do it and from where?


$attributes = array('id' => 'mainform' , 'name' => 'mainform');
echo form_open('password/pass_change_conf' , $attributes);
<!--form name ='mainform' id ='mainform' action='pass_change_conf' method='post'-->

    <input type="hidden" name="Registration_ID" id="Registration_ID" value="<?=$_SESSION['sregistration_id']?>" />
    <input type="hidden" name="Username_VC" id="Username_VC" value="<?=$_SESSION['suname']?>" />

    <table width='80%' border='0' class="table" cellpadding=2 cellspacing=2>
            <td colspan='2' class="headertd">
                <h3>Change password<h3>
            <TD class="tdheader" width="30%">Old password</TD>
            <TD class="datatd">
                &lt;input type="password" name="old_password" id="old_password" value="" class="txtbox" /&gt;

            <TD class="tdheader">New password</TD>
            <TD class="datatd">&lt;input type="password" name="new_password"  id="new_password" value="" class="txtbox" /&gt;&lt;/td>

            <TD class="tdheader">Confirm password</TD>
            <TD class="datatd">&lt;input type="password" name="conf_password" id="conf_password" value="" class="txtbox" /&gt; </td>

            <TD colspan='2'>    
                &lt;input type="submit" name="save" value="Save" style="cursor:hand"&gt;
                &nbsp;&lt;input type="button" value="Cancel" style="cursor:hand" name="Cancel"&gt;    

CONTROLLER: password.php

class Password extends Controller {

    function __construct()
        if (!$this->site_sentry->is_logged_in()) {redirect('login');}

    // --------------------------------------------------------------------

    function index()
        $data['page_title'] = $this->lang->line('change_password');

    // --------------------------------------------------------------------

    function change_password()
        //$data['extraHeadContent'] = "[removed][removed]\n";
        $data['page_title'] = $this->lang->line('change_password');
        $this->load->view('password/change_password', $data);

    // --------------------------------------------------------------------

    function pass_change_conf(){
        $Username_VC = $this->input->post('Username_VC');
        $Registration_ID = $this->input->post('Registration_ID');
        $old_password = $this->input->post('old_password');
        $new_password = $this->input->post('new_password');

        $data = $this->password_model->user_pass_change($Username_VC , $Registration_ID , $old_password, $new_password);
        if($data ==  true){

            $this->session->set_flashdata('message', '<p>Your password has change, you need to logout & again login to activate your new password</p>');
            //echo "pass change";
            $data['message'] = "<p>Old password does not matched</p>";
            $this->session->set_flashdata('message', '<p>Old password does not matched</p>');
            //echo "pass not change";

Messages In This Thread
print message in lightbox after submit - by El Forum - 04-27-2009, 01:18 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.