34 lines
686 B
Plaintext
34 lines
686 B
Plaintext
---
|
|
import "../styles/theme.css";
|
|
|
|
if (Astro.request.method === "POST") {
|
|
try {
|
|
const data = await Astro.request.formData();
|
|
// Do something with the data
|
|
} catch (error) {
|
|
if (error instanceof Error) {
|
|
console.error(error.message);
|
|
}
|
|
}
|
|
}
|
|
---
|
|
|
|
<div>
|
|
<h1>Register</h1>
|
|
<form method="POST">
|
|
<label>Username:</label>
|
|
<input type="text" name="username" required />
|
|
<label>Email:</label>
|
|
<input type="email" name="email" required />
|
|
<label>Password:</label>
|
|
<input type="password" name="password" required minlength="6" />
|
|
<button>Submit</button>
|
|
</form>
|
|
</div>
|
|
|
|
<style>
|
|
:root {
|
|
background-color: var(--background);
|
|
}
|
|
</style>
|