Redirect after registration in script register users

Place for comments, problems, questions, or any issue related to the JavaScript / PHP scripts from this site.
maquis
Posts: 5

Redirect after registration in script register users

Hello Admin,

I want to know how I can be able to redirect users to a thank you page after a successful registration instead of a confirmation email.

Thank you in anticipation.

Admin Posts: 805
Hello
1. In the "config.php" file set the value of the RANK constant to 1 (line 47):

Code: Select all

define('RANK', 1);
2. In the "class.UsersReg.php" file, replace this code (line 31, in the addUser() function):

Code: Select all

$msg = sprintf($this->lsite['register']['regmsg'], $username);
- with this:

Code: Select all

$msg ='ok-redirect';
3. In the "functions.js" file, replace this code (line 76, in the ajaxSend() function):

Code: Select all

else if(reID == adboxshow) $('#'+reID).html(clsadbox+response);
With this:

Code: Select all

else if(reID == adboxshow){
  if(response.indexOf('ok-redirect') !=-1) window.location ='/path/thank_you_page';
  else $('#'+reID).html(clsadbox+response);
}
- The redirect will be made in JS to the "/path/thank_you_page" page; when the php response contains the "ok-redirect" string.

maquis Posts: 5
Thank you very much sir. I have other questions that I will post soon, hope you will have the time to answer.

Similar Topics