How to Implement Add/Edit/Delete/View with PHP using Angular JS (Part-1)

1480阅读 0评论2016-03-16 ztguang
分类:Web开发

http://tech-blog.maddyzone.com/javascript/perform-addeditdeleteview-php-using-angular-js


How to use CRUD(create read update delete)  in angular With PHP ?

Our Blog Regarding Interaction Angular JS with PHP teaches you :

How to –

– Add Product
– Edit Product
– Delete Product
– View Product in Grid Form using below Example using Angular JS and PHP.

To Interact Angular JS with PHP We have to follow following Steps:

First Step :

– First , we have to create a database wih name “Shopping” while open phpmyadmin after starting “Xampp or Wamp Server” for PHP.

– We will follow the below Database Structure as mention in snapshot.

Database Structure

add edit delete db in angular

Snapshot showing a table name as “product”, having fields like :

after creating this table in phpmyadmin we completed database for our example.
Now the next step is how we will use this database structure in our most required example.

Second Step :

– For this, we simply create a below folder structure in htdocs folder of Xampp Server.

– Folder name showing angular example like : angular_example

– After creating a folder we create our first php file for this by name “config.php” in this folder. config.php file have below detail for database connectivity with database we created in First Step:

Config.php file