answersLogoWhite

0


Best Answer

When data is POSTed to a PHP script, you may access them from the $_POST super global variable.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Where are variables displayed when using the POST method?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

What are the POST and GET methods in PHP?

$_POST and $_GET are both PHP functions used to extract input from HTML forms. However, the difference is that $_POST keeps the extracted variables hidden from users, whereas $_GET does not. Because of this, there is a major difference between the two functions in terms of security.Why would you use $_GET at all, then? Because some websites have large databases full of information for the user. For example, say you were shopping online, and you go to buy 2 pairs of pants (item #125). The URL that you are sent to might look like this:catalog.php?item=125&quantity=2As you can see, the variables obtained through $_GET are visible to the user.The POST method has possibility of much volume data sending (usually by the server settings limited) and it may be used unless it represents benefits in comparing GET method. A lot of browser can not correctly bookmark pages which are displayed after HTTP POST method, because the submitted data is displayed in the address bar.When you need the query string, which is get by GET method using (ineffective by it's limits), you will try to use POST method for your forms. You can use POST method if you submit the important information which shouldn't be displayed in the address bar.


What is doPost in servlet?

doPost() is the method in the servlet that is used to service the Http requests submitted using the Post option. HTML forms can be submitted in two ways using the Get method and the Post method. You can specify the method while declaring the form itself. So you will have two methods in the servlet doGet() and doPost() each for one of them


What is the difference between POST and REQUEST methods in PHP?

The $_POST array contains only variables supplied by a form that used the POST method, while the $_REQUEST array combines the $_POST, $_GET and $COOKIE arrays.


What is difference between GET and POST in servlets in java?

The difference between a GET and a POST is the way data is transferred to a servlet. With a GET, the URL will show each name/value pair on the query string in the URL. For example, if you had a form with a field named 'foo,' and when submitted had a value of 'bar,' the URL might be something like this: http://www.example.com/servlet?foo=bar With a POST, this information is not visible in the URL. Instead, it is transferred in the HTTP headers. As far as the actual servlet is concerned, there is not a great deal of difference when it comes to getting the parameters. Whether you use a GET or a POST, you still use request.getParameter("foo"); to get the value. The method used in the Servlet for processing either a GET or a POST is different too. If you use a GET, the method that is called is doGet(HttpServletRequest, HttpServletResponse). The doGet method is also called if there is no GET or POST data. If you use a POST, the method called is doPost(HttpServletRequest, HttpServletResponse).


What is doGet method in servlet?

The doGet() method is the method inside a servlet that gets called every time a request from a jsp page is submitted. The control first reaches the doGet() method of the servlet and then the servlet decides what functionality to invoke based on the submit request. The get method called when the type of page submission is "GET" There is another way of submitting requests from a jsp page is "POST" and when that happens it calls the doPost() method inside the servlet.

Related questions

When using the POST method variables are displayed in the URL.true or false?

true


When using the POST method variables are displayed in the URL is it true?

True


When using the POST method variables are displayed in the URL true or false?

False


When using post method in php whether the variable displayed in url?

No, the variables do not form part of the URL visible in the address bar. They only display in GET methods or manually appended.To access POST variables in scripts, you need to use $_POST['variable_name'];


What are the differences between a GET and POST method for data submission. Which technique would prove to be more advantageous and in what cases?

When you use the get method the information is displayed in the URL. So it is not very safe for sending information like password or ID. Besides that it cannot be used to send variables with values larger then 2000 characters.When you use the post method the information is not displayed in the URL hence you cannot bookmark. But it can send upto 8 MB or more data and is more secure compared to the get method.


What are the POST and GET methods in PHP?

$_POST and $_GET are both PHP functions used to extract input from HTML forms. However, the difference is that $_POST keeps the extracted variables hidden from users, whereas $_GET does not. Because of this, there is a major difference between the two functions in terms of security.Why would you use $_GET at all, then? Because some websites have large databases full of information for the user. For example, say you were shopping online, and you go to buy 2 pairs of pants (item #125). The URL that you are sent to might look like this:catalog.php?item=125&quantity=2As you can see, the variables obtained through $_GET are visible to the user.The POST method has possibility of much volume data sending (usually by the server settings limited) and it may be used unless it represents benefits in comparing GET method. A lot of browser can not correctly bookmark pages which are displayed after HTTP POST method, because the submitted data is displayed in the address bar.When you need the query string, which is get by GET method using (ineffective by it's limits), you will try to use POST method for your forms. You can use POST method if you submit the important information which shouldn't be displayed in the address bar.


Is there any limitation in the length of the query string when using GET or POST method?

There is no limitation for the POST method but for the GET method it is 256 characters


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.


What is doPost in servlet?

doPost() is the method in the servlet that is used to service the Http requests submitted using the Post option. HTML forms can be submitted in two ways using the Get method and the Post method. You can specify the method while declaring the form itself. So you will have two methods in the servlet doGet() and doPost() each for one of them


What is the difference between get and post method in HTTP?

As per functionality both GET and POST methods were same.Difference is GET method will be showing the information information to the users.But in the case of POST method information will not be shown to the user. The data passed using the GET method would be visible to the user of the website in the browser address bar but when we pass the information using the POST method the data is not visible to the user directly. Also in GET method characters were restricted only to 256 characters.But in the case of POST method characters were not restricted. Get method will be visible to the user as it sended appended to the URL, put Post will not be visible as it is sent encapsulated within the HTTP request body. About the data type that can be send, with Get method you can only use text as it sent as a string appended with the URL, but with post is can text or binary. About form default, Get is the defualt method for any form, if you need to use the post method, you have to change the value of the attribute "method" to be Post. Get method has maximum length restricted to 256 characters as it is sent appended with the URL, but the Post method hasn't. Get method has limitataion in the size of data tranamitted, but post method hasn't.


What is the difference between POST and REQUEST methods in PHP?

The $_POST array contains only variables supplied by a form that used the POST method, while the $_REQUEST array combines the $_POST, $_GET and $COOKIE arrays.


How do you retrieve an HTML option value using PHP?

You will have to build a form for this: Put the form elements inside this and add a submit button (). Once the user clicks the submit button, all selected and entered values are sent to the file "eval.php" using the get-method, i.e. they are entered into the URL. You may alternatively use the post-method (method="post"), which sends the values "invisibly".In your php script you can now access the variables using the $_GET array. This array is filled with the values using each elements name-attribute as the array index and the element's value as the array value.So if you had an , the entered text is stored at $_GET['foo']. If you used the post-method, the values are stored in the $_POST array.If you want the user to stay at the same page, you can simply specify the form like this: action="?".