[Solved] Redirect Issue Codeigniter |
I am unable to redirect back to url I have set
When I am in http://localhost/myproject/newthread/1 And I echo out $forum_id id displays 1 which is correct. PHP Code: <?php I want to be able back to redirect('forum') . $forum_id; http://localhost/myproject/forum/1 But for some reason when I redirect it does not add the variable I have set instead redirects to http://localhost/myproject/forum/ How to make sure when redirect it can redirect with added uri segment Code: $route['forum/(:num)'] = 'catalog/qna/forum/index/$1';
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
(12-17-2016, 03:05 AM)pdthinh Wrote: It worked like PHP Code: redirect('forum/' . $forum_id); For some reason works on site_url('forum/') . $forum_id but not redirect('forum/') . $forum_id;
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
(12-17-2016, 03:12 AM)wolfgang1983 Wrote:(12-17-2016, 03:05 AM)pdthinh Wrote: site_url() return string so concatenation works, but redirect will stop the current script. |
Welcome Guest, Not a member yet? Register Sign In |