Overblog
Edit post Seguir este blog Administration + Create my blog
TecnoSetfree

how to make login form in php and mysql - Part I

24 Junio 2020 , Escrito por TeSet-TecnoSetfree Etiquetado en #how to, #Programación, #programming, #programmer

how to make register user php mysql

Hi Friends! Today  i am going to show how to make login form in php and mysql (Firts part)

Register user php mysql

 

into localhost directory create Login folder, here we add the following files.

We need create the following docs:

conexion.php: Data base conection.

index.html: Página principal del proyecto, desde ahi crearemos el nuevo usuario.

registrar-usuario.php: Script to add new user to the database.

how to make login form in php and mysql - Part I

This file is  database connection only. We start login session php mysql.

 

Index.html
index.html

index.html

login with php


In this file a simple index has been made (although responsive to educate yourself in this area) with three inputs and two buttons where the user must add their data and password.

You can expand and add more data at your convenience.

 

registrar-usuario-php
registrar-usuario.php

registrar-usuario.php

In this file we receive the data from the index.html form. They are stored in the variables $ _POST ['password'] and $ _POST [username] to be later inserted into the DB.

Before proceeding with the login, it is verified that the user is not previously registered ($ searchUser, line 15), if so, the operation is aborted and the user is notified that he must choose another nickname. If everything is fine, you are asked to log in using another form, we will see this in the next post:

How to make login form in php and Mysql part II

 

Compartir este post
Repost0
Para estar informado de los últimos artículos, suscríbase:
Comentar este post