John Davidson

parameters - how to get value using get method from php

0 comments
Message:


below is url : http://test.com/admin.php?&state=JAMMU+&KASHMIR


using get method i want value of parameter state.


thanks for help



My Answer:
id=123&name=john&age=30

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

Comments




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