JSEB
Newb
- Apr 2, 2020
- 13
- 14
I am trying to write one PHP script for 3 different HTML forms that validate the input on the form, and can calculate the total for each individual form. Create an overall total between the three forms, and print/show the individual and overall totals. If that makes any sense..
3 different forms are Shirt, Pants, and Shoes.
3 different forms are Shirt, Pants, and Shoes.
You must be registered for see links
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Voyage Clothing - Index</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
<style>
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
* {
font-family: 'Bebas Neue', cursive;
-webkit-text-stroke: 0.0001em black;
}
h1 {
text-align: center;
font-size: 40px;
color: #66FCF1;
}
h2 {
text-align: center;
font-size: 30px;
color: #45A29E;
}
p {
text-align: center;
font-size: 16px;
color: black;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
width: 15%;
}
img:hover {
opacity: 0.5;
}
body {
background-color: white;
}
form {
margin: 0 auto;
width:250px;
}
</style>
</head>
<body>
<h1> Voyage Clothing </h1>
<section class="shirts">
<h2> Shirts </h2>
<img src="/img/shirt.png" alt="voyage-shirt">
<form>
<label>Number of Shirts: <input type="number"></label>
</form>
<p> Total for shirts: </p>
</section>
<section class="pants">
<h2> Pants </h2>
<img src="/img/jeans.jpg" alt="jeans">
<form>
<label>Number of Pants: <input type="number"></label>
</form>
<p> Total for your pants: </p>
</section>
<section class="shoes">
<h2> Shoes </h2>
<img src="/img/shoes.png" alt="shoes">
<form>
<label>Number of Shoes: <input type="number"></label>
</form>
<p> Total for your shoes: </p>
</section>
</body>
</html>