This commit is contained in:
unknown 2024-10-10 14:05:51 +02:00
parent 010f5e742d
commit aa382f3dba
5 changed files with 116 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.swp

60
css/style.css Normal file
View File

@ -0,0 +1,60 @@
body {
/* Center the form on the page */
text-align: center;
}
form {
display: inline-block;
/* Form outline */
padding: 1em;
border: 1px solid #ccc;
border-radius: 1em;
}
p + p {
margin-top: 1em;
}
label {
/* Uniform size & alignment */
display: inline-block;
min-width: 90px;
text-align: right;
}
input,
textarea {
/* To make sure that all text fields have the same font settings
By default, textareas have a monospace font */
font: 1em sans-serif;
/* Uniform text field size */
width: 300px;
box-sizing: border-box;
/* Match form field borders */
border: 1px solid #999;
}
input:focus,
textarea:focus {
/* Additional highlight for focused elements */
border-color: #000;
}
textarea {
/* Align multiline text fields with their labels */
vertical-align: top;
/* Provide space to type some text */
height: 5em;
}
.button {
/* Align buttons with the text fields */
padding-left: 90px; /* same size as the label elements */
}
button {
/* This extra margin represent roughly the same space as the space
between the labels and their text fields */
margin-left: 0.5em;
}

27
index.php Normal file
View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<p> test </p>
<form action="/my-handling-form-page" method="post">
<p>
<label for="name">Name:</label>
<input type="text" id="name" name="user_name" />
</p>
<p>
<label for="mail">Email:</label>
<input type="email" id="mail" name="user_email" />
</p>
<p>
<label for="msg">Message:</label>
<textarea id="msg" name="user_message"></textarea>
</p>
</form>
</body>
</html>

14
sql/init.sql Normal file
View File

@ -0,0 +1,14 @@
CREATE TABLE Persons (
PersonID int primary key auto_increment,
LastName varchar(255),
FirstName varchar(255),
Email varchar(255),
Subject varchar(255),
Path varchar(255)
);
INSERT INTO Persons (LastName, FirstName, Email, Subject, Path)
VALUES
('Smith', 'John', 'john.smith@example.com', 'Math', '/path/to/johnsmith'),
('Doe', 'Jane', 'jane.doe@example.com', 'Physics', '/path/to/janedoe'),
('Brown', 'Charlie', 'charlie.brown@example.com', 'Chemistry', '/path/to/charliebrown');

14
sql/sql.sql Normal file
View File

@ -0,0 +1,14 @@
CREATE TABLE Persons (
PersonID int primary key auto_increment,
LastName varchar(255),
FirstName varchar(255),
Email varchar(255),
Subject varchar(255),
Path varchar(255)
);
INSERT INTO Persons (LastName, FirstName, Email, Subject, Path)
VALUES
('Smith', 'John', 'john.smith@example.com', 'Math', '/path/to/johnsmith'),
('Doe', 'Jane', 'jane.doe@example.com', 'Physics', '/path/to/janedoe'),
('Brown', 'Charlie', 'charlie.brown@example.com', 'Chemistry', '/path/to/charliebrown');