Welcome Guest, Not a member yet? Register   Sign In
URL Redirect Problem [Solved]
#1

[eluser]Ahmed Iqbal[/eluser]
Hello,

my url is look like 'http://www.domain.com/health/25105/best_medicine.html'
Now im also use here one form to submit comments...!

Please let me know, when i will submit my comment, url again redirect to 'http://www.domain.com/health/25105/best_medicine.html' current article...!

well, by using 'redirect(current_url())' its move to form submit path not on current url path....!
#2

[eluser]michalsn[/eluser]
This is normal behavior. You have at least 3 choices:
- add hidden field to form with current_url() and use it to redirect
- set flashdata before form submit to current_url and after submit redirect with this variable
- use $_SERVER['HTTP_REFERER'] (but it isn't always a good idea)
#3

[eluser]Ahmed Iqbal[/eluser]
Hello michalsn,

First Thanks for your help...!

"- add hidden field to form with current_url() and use it to redirect"

very helpful in this case...! i used this Big Grin

take care have a good daye




Theme © iAndrew 2016 - Forum software by © MyBB