Welcome Guest, Not a member yet? Register   Sign In
how to disable backword in explorer?
#1

[eluser]mostafash[/eluser]
Hi,
I have a registartion service with CI.In this service I shouldn't allow user to use explorer back button.
Can I user CI or I should use javascript?
help me with code plzzz.
thnx all
#2

[eluser]alexwenzel[/eluser]
PHP is server side scripting.
Javadcript is client side scripting.

But i dont believe this is possible.
#3

[eluser]Pert[/eluser]
You won't be able to disable back button. You can save a session variable with current registration step, and in your controller only show that step. Code for this really depends on how you have set your controllers up, but something like this:

Code:
function register()
{
   $new_step = false;
   switch($this->session->userdata('reg-step'))
   {
       default:
       case 1:

          // show step 1
          if (validation is OK)
          {
             $new_step = 2;
          }
       break;
       case 2:
          // show step 2
       break;
   }


   if ($new_step)
   {
        $this->session->set_userdata('reg-step', $new_step);
        redirect(uri_string());
   }
}




Theme © iAndrew 2016 - Forum software by © MyBB