PHP Tutorial – $_REQUEST Function
In previous tutorials we already looked at the PHP built-in $_GET function and $_POST function. In this tutorial we take a quick look at the PHP built-in $_REQUEST function.
The PHP built-in $_REQUEST function can be used with both the GET and POST methods.
Let’s take a look at an $_REQUEST function example:
<html>
<body>
<form action="test.php" method="post">
Your name: <input type="text" name="yourname" />
<input type="submit" />
</form>
</body>
</html>
In the test.php script we can do the following (note: that we have use the POST method in the form):
Welcome <?php echo $_REQUEST ["yourname"]; ?>!
That’s all for this tutorial. (We said it would be a quick look 😉 )
This entry was posted in PHP Tutorials.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.
Tweet This! or use
to share this post with others.
good example thanks for it.i get the idea properly again thanks…..
Wow cool,,, That fors this fast fast tutorial 😀
very useful, fast, easy to understand.
it’s so nice ,Really this example help me so much…..
Thankyou…. for the short and good example…