I am trying to receive a very simple input through HTML and PHP using GET.
I can’t seem to get the variable from the form that I am using.
index.html
:
<!DOCTYPE html>
<html>
<form action="track.php" method="get">
input: <input type="text" name="input" required> <br>
<input type="submit" value="Analyze">
</form>
</html>
track.php
:
<!DOCTYPE html>
<html>
<body>
<?php echo $_GET["input"]; ?>
</body>
</html>
Repl: https://replit.com/@gabegad123/seedAnalysis
After I press submit, I don’t see anything. The problem seems to be around the “PHP echo” area of track.php, but I can’t see the problem. What am I doing wrong?