URI segment disappears after validation_run() - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: URI segment disappears after validation_run() (/showthread.php?tid=71824) |
URI segment disappears after validation_run() - mk_seven - 09-28-2018 im trying to go from mysite.com/signin/1 to mysite.com/course/enroll/1 but after validation_run() the segments just goes away. PHP Code: public function signin(course_id=null) { i kept on being redirected to mysite.com/student even tho course_id is not empty. right now, i just used session to get around this problem but i know that is not an efficient solution. RE: URI segment disappears after validation_run() - dave friend - 09-28-2018 Have you done anything with routes? Based on the limited code shown you should not need to, but that's the only thing that comes to mind - assuming you have actually directed the browser mysite.com/signin/1 and not accidentally used mysite.com/signin/. RE: URI segment disappears after validation_run() - mk_seven - 09-29-2018 (09-28-2018, 08:13 AM)dave friend Wrote: Have you done anything with routes? Based on the limited code shown you should not need to, but that's the only thing that comes to mind - assuming you have actually directed the browser mysite.com/signin/1 and not accidentally used mysite.com/signin/. i have my routes for these are Code: // normal signin normal signing-in works fine, but when i have to pass the course_id segment it disappears and redirects me to mysite.com/student RE: URI segment disappears after validation_run() - mk_seven - 09-29-2018 My Controller (Login.php) PHP Code: <?php View (view_signin.php) Code: <?php |