John Davidson

parameters - how to get value using get method from php


below is url :

using get method i want value of parameter state.

thanks for help

My Answer:

To get the value of the "id" parameter from the above URL using the GET method in PHP, you can use the following code:

$id = $_GET['id'];

This code will retrieve the value "123" from the URL parameter "id" and store it in the variable $id. You can do the same for the "name" and "age" parameters by replacing 'id' with 'name' and 'age' respectively.

Rate this post

4 of 5 based on 5769 votes


© 2024 - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us