answersLogoWhite

0

What is the GET method in PHP?

Updated: 8/17/2019
User Avatar

Wiki User

13y ago

Best Answer

The GET method in PHP allows you to grab information from the URL to use in your script.

For example, say you are on the URL index.php?id=1 you could then in the PHP script grab the id using the GET method to use in your script.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the GET method in PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you add a comment in PHP?

< ?php // This is an example of comment in PHP /* This is another example of comment in PHP and we can write comments in multiple lines using this method */ ? >


What is latest version in php?

Probably 5.4. In either case try the below method to get the version on your computer <?php echo phpversion(); ?>


What is the main method of starting PHP code?

When scripting in PHP, you always want to open up the script with a tag.


What is the role of HTML in php?

HTML is one method by which PHP can output a response. Other response methods are file, database, email, and network (URI).


How do you make a login using PHP?

Create an HTML form with METHOD="post" and ACTION="login2.php". In login2.php check if the entered username and password are correct. You can get the username with $_POST['name_of_username_input']. The same goes for the password.


Passing details to a same page using PHP?

PHP is server side producing a webpage that is served to your browser. In order to pass details to a php script you will need to send then via a form. This can be done via a standard form with method="post" or method="get" the variables are read by php as $_GET['var_name'] or $_POST['var_name'] with var_name being the name of the INPUT on the form. If you omit the action (action="page2.php") then the form will post to itself (no matter what you call it) and not specifically page2.php If you want to pass values but not refresh the page then lookup 'ajax'. Its a method of posting forms using javascript which will then wait for the result and deal with the text response. eg. OK or ERROR:email not valid


Request method is secure or not in PHP?

No, you are better using the correct type ie: $_POST or $_GET


How many method used to collect values in a form in php?

POST, GET & REQUEST will get the values from a form.


Using php how do you choose from get method and post method to get information from forms?

Use the post method as far as possible. It encrypts the requests and then sends it to the server. Comparatively you could say it is more secure.


How do you restore the value of textbox from one page to another in PHP?

You could do something like this: pg.1.htm <form method="post" action="pg2.php"> <input type="text" name="txt1" size="20" /> </form> pg2.php <?php $textbox = $_POST['txt1']; ?> <input type="text" name="txt2" size="20" value="<?php echo $textbox; ?>" /> Is that what you were asking for?


What is 10 percent in Php 250?

Answer: Php 2510% of Php 250= 10% * Php 250= 0.10 * Php 250= Php 25


How do you get the data using GET method in PHP?

To get the GET method data in PHP is pretty simple to do, all you need to do is the following.First of all lets say the page we are on is index.php?type=1&page=10&word=hello