Table of Contents

Web Development Lesson 8 - Forms

Exercises

Objective

In this activity, you will create a form to add and update data for players in the Colombian Football team.

Setup

style.css

ul {
    list-style-type: none;
    background-color: gold;
    padding-top: 10px;
    padding-bottom: 10px;
    margin: 0px;
}

li {
    display: inline;
    border-right: solid 1px yellow;
}

html {
  height: 100%;
}

body {
    padding: 0px;
    margin: 0px;
    align-items: stretch;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: gold;
}

a {
    text-decoration: none;
    color: #333;
    padding: 10px;
    font-weight: 700;
    font-family: arial;
}

ol {
    color: blue;
}
  
ol ol {
  font-weight: 700;
}

ul {
  list-style-type: none;
}

td, th {
  border-width: 1px;
  border-style: solid;
}

td {
  padding: 10px;
}

table {
  border-collapse: collapse;
}

header {
  background-color:gold;
  border:gold solid 2px;
  height: 60px;
  width: 100%;
  text-align: center;
  color: #333;
}

nav {
  width: 100%;
  margin: 0px;
}

main {
  padding: 20px;
  display: flex;
  justify-content:space-around;
  background-color: white;
  flex: 5;
  flex-wrap: wrap;
}

#playerlist ul {
  background-color: white;
  margin: 20px;
}

#playerlist li {
  display: block;
  border: none;
}

#photo, #data {
    background-color: red;
    border-radius: 50px;
    padding: 50px;
    color: #eee;
    width: 350px;
    margin: 20px;
}

#photo img {
  height: 500px;
}

footer {
  background-color: blue;
  border: blue solid 2px;
  width: 100%;
  text-align: center;
  color: #ccc;
}

img {
  float: left;
  max-height: 250px;
  border: solid 2px green;
  margin: 20px 20px 20px 0px;
  padding: 10px;
  border-radius: 30px;
}

h2 {
  text-align: center;
}

#photo img {
  float: none;
  display: block;
  margin: 20px auto;
}

#data table {
  margin: auto;
}

#data table, #data th, #data td {
    border: 0px;
}

#data th {
    text-align: right;
}

#album {
  display: flex;
  justify-content:space-between;
  flex-wrap: wrap;
}

video {
  max-height: 250px;
  float: right;
  clear: left;
  margin: 20px 0px 20px 20px;
  padding: 10px;
}

audio {
  margin: 20px 20px 20px 0px;
  padding: 10px 10px 10px 0px;
}

input[type=button] {
  display: block;
}

figcaption {
  display: block;
  text-align: center;
  font-family: 'Arial', sans-serif;
  color: green;
}

form.php

<?php
    $page = "form";
    include ("header.php");
    include ("menu.php");
?>
    <main>

    </main>
<?php
    include ("footer.php");
?>

HTML Form

CSS

Javascript

PHP / MySQL

NameSurnameNationalityBirthdateAgeHometownPositionHeightWeightFootGamesPhoto

Next: Summary