How to get value from url in php
Posted by Raj
How to get value from url in php.
In this tutorial,I will explain How to get value from url in php.If you are creating website using PHP then programmers use URL to sent data to another page.
In PHP, $_GET variable is used to get values from url in php.Information sent from a url is visible to everyone.
Example: Get value of URL
index.html
When the user clicks the "Next" link, the URL sent to the server look like this:
http://www.example.com/example.php?name='Test'
Now you can use $_GET variable to Get the value of the previous url in php
Example.php
Output:TestIn this tutorial,I will explain How to get value from url in php.If you are creating website using PHP then programmers use URL to sent data to another page.
In PHP, $_GET variable is used to get values from url in php.Information sent from a url is visible to everyone.
Example: Get value of URL
index.html
<table> <tbody> <tr> <td> Name: <input name="name" type="text" /> </td> <td> Mobile: <input name="mobile" type="text" /> </td> </tr> <tr> <td> <a href="http://www.blogger.com/example.php?name='Test'">Next</a></td></tr> </tbody> </table>
When the user clicks the "Next" link, the URL sent to the server look like this:
http://www.example.com/example.php?name='Test'
Now you can use $_GET variable to Get the value of the previous url in php
Example.php
<?php $name=$_GET["name"]; echo $name; ?>
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
Access GET Value In Url,
get a varibal Get previous url in php,
get url parameters,
get value from url in php
.You can leave a response, or trackback from your own site.