Jump to content
Fórum Script Brasil
  • 0

Duvida


maotro

Question

Ola,

fis um sistema que quando a pessoa coloca o login e a senha eele redimericiona pra a pagina de um formulario,

mas ele não verifica se existe o user no banco de dados,

pode colocar qualquer login e qualquer senha que entra,

oque devo colocar para verificar se a o user no banco de dados, e ai se tiver redimericionar !

codigo do login.html

<?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>

Edited by maotro
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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...