Re-direction of the page with html

1

I really do not think they need code to try to answer my question, what I did was a login form, and a registration form, the 2 are linked to the same database in php, what I want to do is that at the moment that you enter the data correctly, it takes you to the registration form, the login form has its own brackets project and the registration form is also in a different folder, what can I do?

    
asked by Jesús 10.08.2018 в 01:11
source

2 answers

0

You can do the validation with php and call a function in Javascript to redirect to the registration page in this way:

function redirect_Reg() { location.href = "../ProyectoRegistro/pagRegistro.html"; }

    
answered by 10.08.2018 / 02:50
source
0

According to what I understand, what you need is that the validation with the BD is satisfactory, if you direct it to your project, being that way, then it would be from php like this:

if(validacion== false){

  //esta es una ruta relativa que depende de la geraquia de las carpetas
  //si estas dentro de una capeta y debes sali precedelo de ../ para sali
  header("location: carptea/brackets.php");

}else{


 //si no se cumple la validacion re direcciona al mismo loguin o formulario
     header("location: login.php");
    }

I hope you serve and marques xD ... ReNiceCode ...

    
answered by 10.08.2018 в 02:31