tryin make form submission work

This commit is contained in:
superdimensional 2021-04-16 23:53:19 -04:00
parent fbba0b5992
commit 0b80788fc7
3 changed files with 12 additions and 2 deletions

View file

@ -7,4 +7,6 @@
- add an about me section
- form for ideas
- seprate page or section for dotfiles/configs
- 404 page
---

8
calculators/main.php Normal file
View file

@ -0,0 +1,8 @@
<?php
// The global $_POST variable allows you to access the data sent with the POST method by name
// To access the data sent with the GET method, you can use $_GET
$say = htmlspecialchars($_POST['say']);
$to = htmlspecialchars($_POST['to']);
echo $say, ' ', $to;
?>

View file

@ -17,8 +17,8 @@
<a href="main.html" class="btn">Back</a>
</header>
<main class="main-content">
nothing yet
<form action="https://array-in-a-matrix.github.io/calculators/quadratic.html" method="GET">
<form action="https://array-in-a-matrix.github.io/calculators/quadratic.html" method="POST">
<div>
<label for="say">What greeting do you want to say?</label>
<input name="say" id="say" value="Hi">