Jump to content
Fórum Script Brasil
  • 0

Duvida


maotro

Question

ola,

eu estou criando um sistema,

e tipo na hora que a pessoa colocar o login e senha,

se estiver correto queria que redimericiona-se pra um formulario que criei,

como posso fazer?

Codigo do Login

<HTML>
<HEAD><TITLE> Conexão Mysql; Login </TITLE>
<BODY>
<form action="login_vai.php" method="user">
Sistema mysql<BR>
Login: <input type="text" name="login"><br>
Senha <input type="password" name="senha"><br>
<input type="submit" value="Enviar">
<input type="reset" value="Apagar Campos">
<?php 
header('Localização: index.html'); 
?>


</form>
</BODY></HTML>

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Tente assim:

<?php
  if($POST["submit"] == "Enviar"):

   // sua validação de campos e se estiver tudo ok, faça o redirecionamento conforme abaixo:

header("location:suapagina.php");

endif;
?>

<HTML>
<HEAD><TITLE> Conexão Mysql; Login </TITLE>
<BODY>
<form action="." method="user">
Sistema mysql<BR>
Login: <input type="text" name="login"><br>
Senha <input type="password" name="senha"><br>
<input type="submit" value="Enviar">
<input type="reset" value="Apagar Campos">
</form>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...