idea96 Posted February 18, 2014 Share Posted February 18, 2014 Hello everyone... I am trying to get a variable (path of the page) sent to a login form, which will use the get value received for session redirect... $_GET["pageroute"]; $setpath=htmlentities($_GET["pageroute"]); if($session->login($input->post->user, $input->post->pass)) { $session->redirect('$setpath'); any suggestion please... Tj Link to comment Share on other sites More sharing options...
adrian Posted February 18, 2014 Share Posted February 18, 2014 Not sure I completely follow, but it might be better to just send the page ID to the login form: ?pageid={$page->id} It is cleaner and easier to send a number in a "get". Then you can do: $pageid = (int) $input->get->pageid; to make sure it is only an integer that was sent to the form. Then on the page that displays the form you can get the path of the page if you need it using: $page_path = $pages->get($pageid)->path; But depending on your actual code structure and needs, there might even be a cleaner way. You could potential use a session variable - lots of options. If this idea doesn't seem a good fit, let us know and we'll help you get it better optimized. Link to comment Share on other sites More sharing options...
idea96 Posted February 20, 2014 Author Share Posted February 20, 2014 Thanks Adrian, will try it out.. Link to comment Share on other sites More sharing options...
Recommended Posts