├── assets ├── img │ └── logo.jpg └── css │ ├── bootstrap-reboot.min.css │ ├── bootstrap-reboot.rtl.min.css │ ├── bootstrap-reboot.rtl.css │ ├── bootstrap-reboot.css │ ├── bootstrap-reboot.min.css.map │ ├── bootstrap-grid.min.css │ └── bootstrap-grid.rtl.min.css ├── config └── config.php ├── produtos.sql ├── excluir_produto.php ├── inserir_produto.php ├── includes ├── header.php └── classes │ └── Produto.php ├── index.php └── editar_produto.php /assets/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erik-monteiro/simple-crud-php/HEAD/assets/img/logo.jpg -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- 1 | set_charset('utf8'); 11 | 12 | if ($mysql->connect_error) { 13 | echo 'Erro: ' . $mysql->connect_error; 14 | } 15 | 16 | ?> -------------------------------------------------------------------------------- /produtos.sql: -------------------------------------------------------------------------------- 1 | create schema if not exists entrevista_emprego; 2 | 3 | use entrevista_emprego; 4 | 5 | CREATE TABLE IF NOT EXISTS produtos ( 6 | id int(11) NOT NULL AUTO_INCREMENT, 7 | descricao text NOT NULL, 8 | quantidade int(11) NOT NULL, 9 | valor float NOT NULL, 10 | PRIMARY KEY (id) 11 | ); 12 | 13 | -- colar no SGBD por gentileza -------------------------------------------------------------------------------- /excluir_produto.php: -------------------------------------------------------------------------------- 1 | excluirProduto($_POST['id']); 10 | 11 | header("Location: index.php"); 12 | exit(); 13 | } 14 | 15 | ?> 16 | 17 |
18 |Valor: R$
22 |