• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem about change URL ?

#1
[eluser]MrSmith[/eluser]
I create the form view (called mainpage.php) to input data from users and insert to database (When load this page the URL is http://localhost/index.php/). After I pass the data to controller (method postdata) - the url is http://localhost/index.php/postdata, I want to load mainpage view again. The url should be http://localhost/index.php/ but it is not change so if I refresh this webpage in this state it will insert old data from last input to database again. Please help me how to correct them...T_T

#2
[eluser]poji23[/eluser]
Well if your index controller was called "web", then you can use the redrect method.

Code:
redirect('web');

Just don't forget to include the helper.

#3
[eluser]MrSmith[/eluser]
Thank you very much for your helping :lol:


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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