TheMaskedPencil
Programmer
I a trying to send variable using a GET method, but it isn't showing anything (before it was showing an Undefined Variable error, but I turned the error notices). My question is, how do I pass the variable from one page to the other.
Here is the code for Text.html
<html>
<body>
<form action="text.php" method="get">
Who is your favorite author? <input name="author" type="text"><br><br>
<input type=submit>
</form>
</body>
</html>
And here is the code for the text.php page.
<html>
<body>
Your favorite author is <?php echo $author; ?>
</body>
</html>
I have tried using a $_GET['$author'] and $HTTP_GET['$author'] and still nothing.
I have been looking through all the forums to try and get the answer, but I still cannot get a thing. Any help would be much appreciated.
Here is the code for Text.html
<html>
<body>
<form action="text.php" method="get">
Who is your favorite author? <input name="author" type="text"><br><br>
<input type=submit>
</form>
</body>
</html>
And here is the code for the text.php page.
<html>
<body>
Your favorite author is <?php echo $author; ?>
</body>
</html>
I have tried using a $_GET['$author'] and $HTTP_GET['$author'] and still nothing.
I have been looking through all the forums to try and get the answer, but I still cannot get a thing. Any help would be much appreciated.