answersLogoWhite

0

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

User Avatar

Wiki User

9y ago

What else can I help you with?

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 is it true?

True


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 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


Definition of ex post facto research?

Ex post facto research is a type of research design that investigates relationships between variables after they have occurred. In this design, the researcher does not have control over the independent variables, as they are pre-existing. The study is observational and looks for correlations or causality between variables that have already taken place in the past.


What is the best method for removing a fence post using a fence post remover?

The best method for removing a fence post using a fence post remover is to first dig around the post to expose its base, then attach the fence post remover to the post and use leverage to pull it out of the ground.


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 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 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 the best method for securing a fence post using concrete mix?

The best method for securing a fence post using concrete mix is to dig a hole, place the post in the hole, pour concrete mix around the post, and then add water to the mix. Allow the concrete to set and cure before attaching the fence panels.


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="?".


Which is better to use while submitting a form GET method or POST method?

If your form has security items (like username, password) use POST method. Because post method is more secure. Otherwise you can use GET method. Also GET method is faster than POST method.


Code for post and get in HTML form?

// getFirst name: Last name: Click the "Submit" button and the input will be sent to a page on the server called "form_action.asp".//postThe form-data can be sent as URL variables (with method="get") or as HTTP post (with method="post").Notes on the "get" method:This method appends the form-data to the URL in name/value pairsThis method is useful for form submissions where a user want to bookmark the resultThere is a limit to how much data you can place in a URL (varies between browsers), therefore, you cannot be sure that all of the form-data will be correctly transferredNever use the "get" method to pass sensitive information! (password or other sensitive information will be visible in the browser's address bar)Notes on the "post" method:This method sends the form-data as an HTTP post transactionForm submissions with the "post" method cannot be bookmarkedThe "post" method is more robust and secure than "get", and "post" does not have size limitations


How do you reset oil life on 2011 Honda odyssey?

Using the odometer post (little thingee sticking out of the speedometer) push the post until the oil life is displayed. Then push and hold the post for about 10 seconds. This should reset the oil life to 100%


How to pass form data between HTML pages without using url in java?

This can be accomplished by submitting the form data using the POST method.


What is the purpose of http?

* Using the Get method, you send information to the remote server directly in the URL. This is common for a one-way transaction in which the CF.http function retrieves an object, such as the contents of a web page. * The Post method can pass variables to a form or CGI program, and can also create HTTP cookies