└── crudPhp ├── index.html ├── script.js ├── style.css ├── login ├── script.js ├── style.css ├── header.php ├── footer.php └── index.php ├── bootstrap-5.1.3-dist.zip ├── database.sql ├── db.php ├── delete.php ├── cadastro ├── style.css └── index.php ├── footer.php ├── header.php ├── index.php ├── create.php ├── edit.php └── bootstrap-5.1.3-dist └── css ├── bootstrap-reboot.min.css ├── bootstrap-reboot.rtl.min.css ├── bootstrap-reboot.rtl.css ├── bootstrap-reboot.css ├── bootstrap-reboot.min.css.map ├── bootstrap-reboot.rtl.min.css.map ├── bootstrap-grid.min.css └── bootstrap-grid.rtl.min.css /crudPhp/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crudPhp/script.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crudPhp/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crudPhp/login/script.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const cadastrar=()=>{ 4 | window.location.href='../cadastro/index.php'; 5 | } -------------------------------------------------------------------------------- /crudPhp/bootstrap-5.1.3-dist.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauriciocosta404/projecto-crud-php-html-css-js/HEAD/crudPhp/bootstrap-5.1.3-dist.zip -------------------------------------------------------------------------------- /crudPhp/database.sql: -------------------------------------------------------------------------------- 1 | create database crudPhp; 2 | use crudPhp; 3 | 4 | create table data(id int primary key auto increment,nome varchar(50),email varchar(50)); 5 | show columns from data; -------------------------------------------------------------------------------- /crudPhp/db.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crudPhp/delete.php: -------------------------------------------------------------------------------- 1 | prepare('DELETE FROM data WHERE id= :id'); 7 | $cmd->bindValue(':id',$id); 8 | $cmd->execute(); 9 | header("Location: ./index.php"); 10 | }catch(PDOException $ex){ 11 | $message="fatal error"; 12 | } 13 | 14 | ?> 15 | -------------------------------------------------------------------------------- /crudPhp/cadastro/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | 3 | background-color: #0dcaf0; 4 | } 5 | .wrapper{ 6 | margin: 80px; 7 | } 8 | form{ 9 | display: flex; 10 | flex-direction: column; 11 | } 12 | .form-signin{ 13 | max-width: 380px; 14 | margin: 0 auto; 15 | background-color: #fff; 16 | padding: 15px 40px 50px ; 17 | border: 1px solid #e5e5e5; 18 | } 19 | .form-signin .form-signin-heading, .form-signin .checkbox{ 20 | 21 | margin-bottom: 30px; 22 | } 23 | input[type='email'],input[type='text']{ 24 | margin-bottom: 20px; 25 | } 26 | -------------------------------------------------------------------------------- /crudPhp/login/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | 3 | background-color: #0dcaf0; 4 | } 5 | .wrapper{ 6 | margin: 80px; 7 | } 8 | form{ 9 | display: flex; 10 | flex-direction: column; 11 | } 12 | .form-signin{ 13 | max-width: 380px; 14 | margin: 0 auto; 15 | background-color: #fff; 16 | padding: 15px 40px 50px ; 17 | border: 1px solid #e5e5e5; 18 | } 19 | .form-signin .form-signin-heading, .form-signin .checkbox{ 20 | 21 | margin-bottom: 30px; 22 | } 23 | input[type='email'],input[type='text']{ 24 | margin-bottom: 20px; 25 | } 26 | .pointer{ 27 | cursor:pointer; 28 | } 29 | -------------------------------------------------------------------------------- /crudPhp/login/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |