Welcome Guest, Not a member yet? Register   Sign In
refresh the page after clicking the button
#9

[eluser]mrcoder[/eluser]
my function is


function saveminiprofile() {
$this->load->helper(array('form', 'url'));
$data['title'] = "Welcome to OneLine";
$data['headline'] = "Mini Profile";
$data['header'] = 'afterloginheader';
$data['menu'] = 'menu';
$data['fotter'] = "<p>Copyright © 2008 itdots.com. All rights reserved.</a>.</p>";
$data['include'] = 'home';
$this->load->vars($data);
$firstname = $this->input->xss_clean($this->input->post('firstname'));

$lastname = $this->input->xss_clean($this->input->post('lastname'));
$email = $this->input->xss_clean($this->input->post('email'));
$username = $this->session->userdata('username');
$password = $this->input->xss_clean($this->input->post('password'));
$country = $this->input->xss_clean($this->input->post('country'));
$mojo = $this->input->xss_clean($this->input->post('mojo'));
$phone1 = $this->input->xss_clean($this->input->post('phone1'));
$phone2 = $this->input->xss_clean($this->input->post('phone2'));
$specialities = $this->input->xss_clean($this->input->post('specialities'));
$config['upload_path'] = 'assets/uploads';
$config['allowed_types'] = 'gif|jpg|png';

$this->load->model('login_model', '', True);
$data['user_details'] = $this->login_model->getuserdetails($username);
$data['specialities_details'] = $this->login_model->getspecialitiesdetails($username);
$data['photos_url'] = $this->login_model->getphotodetails($username);
$data['photo_id'] = $this->login_model->getphotoid($username);
//$config['max_size'] = '600';
//$config['max_width'] = '1024';
//$config['max_height'] = '768';
// loading the upload class
$this->load->library('upload', $config);
$file_name_arr = array('photo1', 'photo2', 'photo3','photo4');
//$file_name_arr=array('userfile1');

for ($i = 0; $i < 4; $i++) {

if($_FILES[$file_name_arr[$i]]['name'] != '')
{
$id = $this->input->xss_clean($this->input->post("h".$file_name_arr[$i]));
if (!$this->upload->do_upload($file_name_arr[$i])) {
$error = array('error'=>$this->upload->display_errors());

} else {

$data1 = array('upload_data'=>$this->upload->data());
//$this->load->view('upload_success', $data);
$filename = $data1['upload_data']['file_name'];
if($filename=='')
$target1 = '../../assets/uploads/nopicture.jpg';
else
$target1 = '../../assets/uploads/'.$filename;

$this->load->model('login_model', '', True);
$res = $this->login_model->savephotos($target1, $username,$id);
}
}
}
$this->load->model('login_model', '', True);
$res = $this->login_model->saveminiprofile($firstname, $lastname, $email, $username, $password, $country, $mojo, $phone1, $phone2, $specialities);
$data['message'] = "mini pofile crated successfully";
$this->load->view('loginsuccess', $data,'refresh');


}

if i use redirect("loginsuccess','refresh')
again i have to pass it to another controler.in controler i have to get agian all the values which are set in loginsuccess paqge.


Messages In This Thread
refresh the page after clicking the button - by El Forum - 08-14-2009, 04:36 AM
refresh the page after clicking the button - by El Forum - 08-14-2009, 06:14 AM
refresh the page after clicking the button - by El Forum - 08-16-2009, 11:32 PM
refresh the page after clicking the button - by El Forum - 08-16-2009, 11:35 PM
refresh the page after clicking the button - by El Forum - 08-17-2009, 12:31 AM
refresh the page after clicking the button - by El Forum - 08-17-2009, 12:38 AM
refresh the page after clicking the button - by El Forum - 08-17-2009, 12:40 AM
refresh the page after clicking the button - by El Forum - 08-17-2009, 12:46 AM
refresh the page after clicking the button - by El Forum - 08-17-2009, 12:52 AM
refresh the page after clicking the button - by El Forum - 08-17-2009, 01:03 AM
refresh the page after clicking the button - by El Forum - 08-17-2009, 01:09 AM
refresh the page after clicking the button - by El Forum - 08-17-2009, 02:29 AM
refresh the page after clicking the button - by El Forum - 08-17-2009, 03:24 AM
refresh the page after clicking the button - by El Forum - 08-18-2009, 06:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB