Edit post Seguir este blog Administration + Create my blog



Un Blog encargado en compartir temáticas de tecnología, how to, hack y programación. Aquí encontraras temas diversos y proyectos que puedes adquirir y/o diseñar a tu manera.

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

Publicado por TeSet-TecnoSetfree activado 24 Junio 2020, 15:56pm

Etiquetas: #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.





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.





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


Para estar informado de los últimos artículos, suscríbase:


¡Somos sociales!

Ultimos Posts