Projects Inventory

Signup/Register using PHP/MySQLi in AngularJS

Creating our Database

First, we’re going to create our database.

1. Open phpMyAdmin.

2. Click databases, create a database and name it as angular

.

3. After creating a database, click the SQL and paste the below codes.

Updating our Main Page

Next, we update index.html by adding the ff. javascript files for our registration.

Creating the link for Signup

Next, in the login.html, in the panel heading, add this to have a link to our registration form.

Updating our Main Angular JS Script

Next, we update angular.js to include our signup form.

Creating our Signup Form

Next, we create our sign up form and we’re gonna name it as signup.html.

Creating our Signup Controller

Next step is to create the controller for our sign up and we’re gonna name it as signupCtrl.js.

Creating our Signup Service

Next, we create our sign up service and we’re gonna name it as signupService.js

Creating our Signup API

Lastly, this is our Signup PHP code/api to insert user in our database.

Download : Signup/Register Full Code 

Exit mobile version