PHP develops user registration function of simple book lending system

In the previous section we created the user registration front-end page

This section will implement its function

It is necessary to judge each registration content through javascript, here we will The checkreg() function is defined.

1614.png

#For example: the user name cannot be empty, the password and confirmation password must be the same, the email address must comply with the specifications, etc.

The next step is to add various registration information to the database by clicking the "Register" button submit

Here, the POST method is used to obtain various values, and the SQL statement INSERT INTO is used to enter the text box The entered user name, password and other information are added to the database.

After successful registration, the automatic ID of the registered user will be obtained.

alert('注册成功,进入首页!');window.location='index.php'"; } ?>

After successful registration, you can jump to the login page.

Continuing Learning
||
alert('注册成功,进入首页!');window.location='index.php'"; } ?>
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!