fixes for resubmission.

This commit is contained in:
Joshua Ashton
2025-03-03 15:46:38 -07:00
parent 6f63a4afb8
commit dd5ee627d8
23 changed files with 129 additions and 0 deletions
View File
+26
View File
@@ -0,0 +1,26 @@
* {
margin: 0;
padding: 0;
}
form {
display: block !important;
}
input {
padding: 12px;
border: 1px solid black;
}
.center {
display: flex !important;
flex-direction: center !important;
align-items: center !important;
justify-content: center !important;
}
.row {
display: flex;
flex-direction: column;
width: 500px;
}
View File
View File
+27
View File
@@ -0,0 +1,27 @@
<?php
function generateForm($fields)
{
$form = '
<form method="post">
';
foreach ($fields as $key => $ex) {
$display = ucwords(str_replace('-', ' ', $key));
$form .= '
<div class="row">
<label for="' . $key . '">' . $display . '</label>
';
$form .= '
<input id="' . $key . 'placeholder="' . $ex . '>
</div>';
}
$form .= '<input type="submit">';
$form .= '
</form>
';
return $form;
}
?>
+31
View File
@@ -0,0 +1,31 @@
<?php
$fields = [
'first-name' => 'e.g., Bob',
'last-name' => 'e.g., Ross',
'street-address' => 'e.g., 123 Main Street',
'city' => 'e.g., Boston',
'state' => 'e.g., MA',
'zip' => 'e.g., 02108',
];
include ('includes/functions.php');
?>
<!doctype html>
<html lang="en">
<head>
<title>Dummy Title</title>
<link href="css/styles.css" type="text/css" rel="stylesheet">
<script src="js/index.js"></script>
</head>
<body>
<?php
echo '<div class="center>
' . generateForm($fields) . '
</div>';
?>
</body>
</html>
View File
View File
View File
View File
View File
View File
+17
View File
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<title>Dummy Title</title>
<link href="css/styles.css" type="text/css" rel="stylesheet">
<script src="js/index.js"></script>
</head>
<body>
<h1>Hello cruel world!</h1>
<?php
?>
</body>
</html>
View File
View File
View File
View File
View File
View File
+23
View File
@@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
<title>Dummy Title</title>
<link href="css/styles.css" type="text/css" rel="stylesheet">
<script src="js/index.js"></script>
</head>
<body>
<form method="post">
<select name="items">
<?php
for ($i = 1; $i <= 30; $i++) {
echo '<option value="' . $i . '">Item #' . $i . '</option>';
}
?>
<input type="submit">
</select>
</form>
</body>
</html>
View File
View File
+5
View File
@@ -0,0 +1,5 @@
<h2>Yep!</h2>
<h2>Nope!</h2>
<h2>Nope!</h2>
<h2>Nope!</h2>
<h2>Nope!</h2>