Welcome Guest, Not a member yet? Register   Sign In
URL not being updated! Please help!
#1

[eluser]Unknown[/eluser]
Hi,

Let me tell you about my website:
1. I am using the latest codeigniter
2. I have included the latest jquery and jquery mobile js and css files.
3. I have controller called 'site'.

The following function gets a user info row from db and loads the information into a view page called accountSettings:
SITE CONTROLLER:
function accountSettings() {
//temp
$id=1;

$data['user']=$this->getUserInfoFromMembership($id);
$data['main_content']='accountSettings';
$this->load->view('includes/template', $data);
}

This works well. On this page, there is an update button to update the user information.
<form action="<?php echo site_url('site/dbUpdateProfile'); ?>" method="post">
<blah><blah<blah>
&lt;input type="submit" name="updateProfile" value="Update Profile"&gt;


function dbUpdateProfile() {
//temp
$id=1;

$dataArray=array('fname'=>$this->input->post('fname'),
'lname'=>$this->input->post('lname'),
'username'=>$this->input->post('username'),
'email'=>$this->input->post('email')
);
if($this->member_model->update_member($id, $dataArray)) {
redirect('site/accountSettings');
//$this->accountSettings();
}
else {
echo "error.....";
}

}

When I push the button to update the profile information, the database does get updated correctly, but the url still shows:
http://localhost/test/CI/index.php/site/dbUpdateProfile

Pressing refresh sets all row values in db to 0, and then the url changes to the correct name:
http://localhost/test/CI/index.php/site/accountSettings

So... the expected page shows up correctly, but the expected url is incorrect.
Can someone help me? Is jquerymobile messing up something in codeigniter?
I have built another site without jquery and I do not have this issue.

Thanks,
Trisha
#2

[eluser]mazzy[/eluser]
I have the same issue with my jquery mobile site.did you resolved it?
#3

[eluser]InsiteFX[/eluser]
try adding:
Code:
redirect('/', 'refresh');
#4

[eluser]mazzy[/eluser]
where I should put
Code:
redirecti('/','refresh')
? I'm already using redirect but I'm using location.If I use refresh it doesn't work.
#5

[eluser]mazzy[/eluser]
I'm thinking to change php framework.I'm developing a jquery mobile site and I'm a lot of problem to handle codeigniter behaviour.is there some any alternative to the using of redirect?




Theme © iAndrew 2016 - Forum software by © MyBB