How To Register Users On The Site

Table of contents:

How To Register Users On The Site
How To Register Users On The Site

Video: How To Register Users On The Site

Video: How To Register Users On The Site
Video: How to Allow User Registration on Your WordPress Site 2024, April
Anonim

Registration is needed to open certain content to a limited number of users, control comments from spammers, and enable them to make purchases in an online store. Registration on the site can be created with programming skills or using a ready-made code.

How to register users on the site
How to register users on the site

Instructions

Step 1

Mechanism for creating registration manually in php. Make a registration form on the main page (index.php) using html markup language. Link to php page with registration data (for example, called registration.php). By clicking the "Register" button, the user will be taken to this page, where he will need to enter his data in the form fields. Login, password, email address will be sent to the handler created in php. After processing, they will be entered into the database and registration will be completed.

Step 2

The encrypted password should be stored in the mysql database. Create a new table in the database, for example, called usersdata. Create a bd.php file that will be used to connect to the database. The link to this file must be registered on the pages before starting the html code.

Step 3

Make a login form on the main page (and others), with fields for entering a username and password. When the user enters data and clicks the "Login" button, this information will be sent to the login.php file for processing and verification. If everything is entered correctly, it will be written to the cookie. Either a session will be launched and the data will be stored in the browser until you exit or close the browser. The exit.php file will be responsible for user exit from the site. Clicking on the "Logout" button will terminate the session or delete the cookie.

Step 4

If you are not yet strong in programming and markup languages, all you need to do is get ready-made code and place it where you need it. You can take it somewhere or use a form constructor such as the MyTaskHelper.ru service. In this case, programming skills are not required. Register, create a form with the fields you need, give them the desired names, customize them to your liking. Decorate the appearance (design) of the form using the "Widgets" module. The service will generate the form code itself, copy it to the desired web page.

Recommended: