Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6684080
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: Web开发

2016-03-16 23:07:34

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 :

  •  id (Unique and Auto increment ID field for a product)
  •  prod_name (Field having value of Name of Product)
  •  prod_price (Field having value of Price of Product)
  •  prod_quantity (Field having value of Total Quantity of Product)

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