fixes for resubmission.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
?>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,5 @@
|
||||
<h2>Yep!</h2>
|
||||
<h2>Nope!</h2>
|
||||
<h2>Nope!</h2>
|
||||
<h2>Nope!</h2>
|
||||
<h2>Nope!</h2>
|
||||
Reference in New Issue
Block a user