News for hackers. Stuff that matters.
Re:Ask HN: Best way to turn a simple static website interact... by Jorge1o1 on Monday March 25, 2019 @08:56AM (#19482047)
If you don’t want to install any frameworks, just use PHP in the way it was originally meant to be used.

When someone POST a form, you can use the $_POST superglobal to extract all of that information from the submitted form.

Then, you can store that information in the $_SESSION superglobal.

Lastly, when the user visits a page with the same or similar form entries, you can actually “echo” their own answers from a previous page into the form.

This is baby’s first PHP here, not really production grade, but still quite useful.

Re:Ask HN: Best way to turn a simple static website interact... by brightball on Monday March 25, 2019 @09:26AM (#19482226)
I'd 2nd this. Just go get some cheap PHP hosting with Hostgator or something similar.

At this point, you don't need a best practice recommendation, you need the learning experience and working with PHP by itself will give you that without a lot of headache.

Re:Ask HN: Best way to turn a simple static website interact... by pluc on Monday March 25, 2019 @09:55AM (#19482393)
<?php print_r($_POST); ?>

go from there

Re:Ask HN: Best way to turn a simple static website interact... by brightball on Monday March 25, 2019 @10:04AM (#19482438)
<pre><?php print_r($_POST); ?></pre>
Re:Ask HN: Best way to turn a simple static website interact... by ahje on Monday March 25, 2019 @10:14AM (#19482517)
<?php header('Content-type: text/plain'); var_dump($_POST);