This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Template Bootstrap</title> | |
<!-- Bootstrap CSS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="formExemplo" data-toggle="validator" role="form"> | |
<div class="form-group"> | |
<label for="textNome" class="control-label">Nome</label> | |
<input id="textNome" class="form-control" placeholder="Digite seu Nome..." type="text"> | |
</div> | |
<div class="form-group"> | |
<label for="inputEmail" class="control-label">Email</label> | |
<input id="inputEmail" class="form-control" placeholder="Digite seu E-mail" type="email"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="formExemplo" data-toggle="validator" role="form"> | |
<div class="form-group"> | |
<label for="textNome" class="control-label">Nome</label> | |
<input id="textNome" class="form-control" placeholder="Digite seu Nome..." type="text" required> | |
</div> | |
<div class="form-group"> | |
<label for="inputEmail" class="control-label">Email</label> | |
<input id="inputEmail" class="form-control" placeholder="Digite seu E-mail" type="email" | |
data-error="Por favor, informe um e-mail correto." required> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<div class="form-group"> | |
<label for="exemplo ">Label: </label> | |
<input id="exemplo" type="text" class="form-control" /> | |
</div> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table id="products-table"> | |
<tbody> | |
<tr> | |
<th>Produto</th> | |
<th>Código</th> | |
<th>Quantidade</th> | |
<th>Preço</th> | |
<th>Ações</th> | |
</tr> | |
<tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
AddTableRow = function() { | |
var newRow = $("<tr>"); | |
var cols = ""; | |
cols += '<td> </td>'; | |
cols += '<td> </td>'; | |
cols += '<td> </td>'; | |
cols += '<td> </td>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE customers ( | |
id int(11) NOT NULL, | |
name varchar(255) NOT NULL, | |
cpf_cnpj varchar(14) NOT NULL, | |
birthdate date NOT NULL, | |
address varchar(255) NOT NULL, | |
hood varchar(100) NOT NULL, | |
zip_code int(8) NOT NULL, | |
city varchar(100) NOT NULL, | |
state varchar(100) NOT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** O nome do banco de dados*/ | |
define('DB_NAME', 'wda_crud'); | |
/** Usuário do banco de dados MySQL */ | |
define('DB_USER', 'root'); | |
/** Senha do banco de dados MySQL */ | |
define('DB_PASSWORD', ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
mysqli_report(MYSQLI_REPORT_STRICT); | |
function open_database() { | |
try { | |
$conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); | |
return $conn; | |
} catch (Exception $e) { | |
echo $e->getMessage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php require_once 'config.php'; ?> | |
<?php require_once DBAPI; ?> | |
<?php | |
$db = open_database(); | |
if ($db) { | |
echo '<h1>Banco de Dados Conectado!</h1>'; | |
} else { | |
echo '<h1>ERRO: Não foi possível Conectar!</h1>'; |
OlderNewer