[PHP] OOP,Bootstrap을 이용하여  PHP PDO CRUD 만들어보기

 

데이터베이스 설계

 

'dbpdo'라는 데이터베이스를 생성하고, 아래 코드를 이용하면 phpmyadmin에 table 과 user fields가 만들어질것입니다.

 

CREATE TABLE IF NOT EXISTS `tbl_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `first_name` varchar(25) NOT NULL,
  `last_name` varchar(25) NOT NULL,
  `email_id` varchar(50) NOT NULL,
  `contact_no` bigint(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=21;

 

Directory

디렉토리 구성은 다음과 같습니다.

bootstrap/
├── css/
│   ├── bootstrap.min.css
├── js/
│   └── bootstrap.min.js
└── fonts/

├── glyphicons-halflings-regular.eot
    ├── glyphicons-halflings-regular.svg
    ├── glyphicons-halflings-regular.ttf
    └── glyphicons-halflings-regular.woff
add-data.php
class.crud.php
dbconfig.php
delete.php
edit-data.php
footer.php
header.php
index.php

 

dbconfig.php

 

'PHP,HTML' 카테고리의 다른 글

Mysql 한글 깨짐 해결 <windows>  (0) 2016.06.29

+ Recent posts