Projeto Integrador de Aplicações WEB

Quarta-feira, 6ª e 7ª aula

Entre no site da Webmotors, crie uma nova página em seu wordpress e reproduza a página inicial com o máximo de fidelidade possível. Na próxima aula iremos criar o banco de dados para cadastro dos veículos.

Bado de Dados 2

				
					<?php

$servidor = "localhost";
$usuario = "root";
$senha = "root";
$banco = "boletim3b";

//cria conexão
$conn = new mysqli($servidor, $usuario, $senha, $banco);

//verifica conexão
if($conn->connect_error) {
    die("Deu ruim" . $conn->connect_error);
}



?>


<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Boletim</title>
    <style>
        table {
            border-collapse: collapse;
            width: 100%;
        }
        th, td {
            border: 1px solid black;
            padding: 8px;
            text-align: center;
        }
        th {
            background-color: #696969;
        }
    </style>
</head>
<body>
    <table>
        <thead>
            <tr>
                <th>Nº</th>
                <th>Aluno(a):</th>
                <th>Nota 1:</th>
                <th>Nota 2:</th>
                <th>Nota 3:</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>Iúri Santos</td>
                <td>10</td>
                <td>9</td>
                <td>8</td>
            </tr>
            
        </tbody>
    </table>
</body>
</html>
				
			
				
					CREATE TABLE `alunos` (
  `id` int(4) NOT NULL,
  `nome_aluno` varchar(100) NOT NULL,
  `nota1` float NOT NULL,
  `nota2` float NOT NULL,
  `nota3` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `alunos`
--

INSERT INTO `alunos` (`id`, `nome_aluno`, `nota1`, `nota2`, `nota3`) VALUES
(1, 'Iúri Santos', 10, 9, 8),
(2, 'Aluno 2', 7, 8, 9),
(3, 'Aluno 3', 9, 10, 9),
(4, 'Aluno 4', 5, 4, 2),
(5, 'Aluno 5', 3, 2, 1);

--
-- Índices para tabelas despejadas
--

--
-- Índices para tabela `alunos`
--
ALTER TABLE `alunos`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT de tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `alunos`
--
ALTER TABLE `alunos`
  MODIFY `id` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;