Added a registration form, and made the pages look a little bit nicer

This commit is contained in:
hayden 2019-06-25 22:16:09 -05:00
parent 90f3a4021b
commit 351004de44
5 changed files with 97 additions and 24 deletions

View File

@ -9,6 +9,6 @@
# this is such a lonely file...
?>
</body>
</div>
</body>
</html>

View File

@ -13,9 +13,9 @@ $title = $title ?? '~chan';
?>
<html>
<head>
<link rel="stylesheet" href="/css/main.css">
<title><?php echo $title; ?></title>
</head>
<body>
<head>
<link rel="stylesheet" href="/css/main.css">
<title><?php echo $title; ?></title>
</head>
<body>
<div class="main">

View File

@ -10,6 +10,9 @@ body {
background-color: var(--bg-color);
}
div.main {
}
/* stuff for input's like the login and post forms */
form.input-form {
}

View File

@ -16,22 +16,29 @@ $path = $_SERVER['DOCUMENT_ROOT'];
include($path . '/core/header.php');
?>
<form action="login.php" class="input-form">
<table>
<tr>
<td><b>username:</b></td>
<td>
<input name="user" type="text">
</td>
</tr>
<tr>
<td><b>password:</b></td>
<td>
<input name="pass" type="password">
</td>
</tr>
</table>
</form>
<div style="
margin: auto;
width: 300px;
padding-top: 100px;
">
<h1>login</h1>
<form action="login.php" class="input-form">
<table>
<tr>
<td><b>username:</b></td>
<td>
<input name="user" type="text">
</td>
</tr>
<tr>
<td><b>password:</b></td>
<td>
<input name="pass" type="password">
</td>
</tr>
</table>
</form>
</div>
<?php
include($path . '/core/footer.php');

63
register.php Normal file
View File

@ -0,0 +1,63 @@
<?php
# - # - # - # - # - # - # - #
# #
# ~chan #
# - #
# by stilbruch #
# #
# - # - # - # - # - # - # - #
// if a registration was submitted
if($_SERVER['REQUEST_METHOD'] == 'POST') {
}
$path = $_SERVER['DOCUMENT_ROOT'];
include($path . '/core/header.php');
?>
<div style="
margin: auto;
width: 350px;
padding-top: 100px;
">
<h1>register</h1>
<form action="login.php" class="input-form">
<table>
<tr>
<td><b>username:</b></td>
<td>
<input name="user" type="text">
</td>
</tr>
<tr>
<td><b>password:</b></td>
<td>
<input name="pass" type="password">
</td>
</tr>
<tr>
<td><b>confirm password:</b></td>
<td>
<input name="confirm_pass" type="password">
</td>
</tr>
<tr>
<td><b>email:</b></td>
<td>
<input name="email" type="email">
</td>
</tr>
<tr>
<td><b>confirm email:</b></td>
<td>
<input name="confirm_email" type="email">
</td>
</tr>
</table>
</form>
</div>
<?php
include($path . '/core/footer.php');
# the end...
?>