Академический Документы
Профессиональный Документы
Культура Документы
REFERENCES | EXAMPLE S | FORUM | ABOUT Get Certified Study Web Technologies and get a diploma at w3schools.com SHARE THIS PAGE
PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP
Basic HOME Intro Install Syntax Variables String Operators If...Else Switch Arrays Sorting Arrays While Loops For Loops Functions Forms $_GET $_POST Advanced Arrays Multi Date Include File File Upload Cookies Sessions E-mail Secure E-mail Error Exception Filter Database MySQL Intro MySQL Connect CREATE DB/Table INSERT INTO SELECT WHERE ORDER BY UPDATE DELETE ODBC
PHP and AJAX AJAX Intro AJAX PHP AJAX Database AJAX XML AJAX Live Search AJAX RSS Reader AJAX Poll PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP PHP Reference Array Calendar Date Directory Error Filesystem Filter FTP HTTP Libxml Mail Math Misc MySQLi SimpleXML String XML Zip Timezones Quiz Quiz Certificate $_GET Variable
PreviousNext Chapter In PHP, the predefined $_GET variable is used to collect values in a form with m ethod="get". The $_GET Variable The predefined $_GET variable is used to collect values in a form with method="g et" Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of info rmation to send. Example <form action="welcome.php" method="get"> Name: <input type="text" name="fname"> Age: <input type="text" name="age"> <input type="submit"> </form> When the user clicks the "Submit" button, the URL sent to the server could look
something like this: http://www.w3schools.com/welcome.php?fname=Peter&age=37 The "welcome.php" file can now use the $_GET variable to collect form data (the names of the form fields will automatically be the keys in the $_GET array): Welcome <?php echo $_GET["fname"]; ?>.<br> You are <?php echo $_GET["age"]; ?> years old! When to use method="get"? When using method="get" in HTML forms, all variable names and values are display ed in the URL. Note: This method should not be used when sending passwords or other sensitive i nformation! However, because the variables are displayed in the URL, it is possible to bookm ark the page. This can be useful in some cases. Note: The get method is not suitable for very large variable values. It should n ot be used with values exceeding 2000 characters. PreviousNext Chapter WEB HOSTING Best Web Hosting eUK Web Hosting UK Reseller Hosting Domain, Hosting & Email WEB BUILDING XML Editor FREE Website FREE Website Best Website STATISTICS Free Trial! BUILDER Creator Templates
Browser Statistics OS Statistics Display Statistics Top 10 Tutorials HTML Tutorial HTML5 Tutorial CSS Tutorial CSS3 Tutorial JavaScript Tutorial jQuery Tutorial SQL Tutorial PHP Tutorial ASP.NET Tutorial XML Tutorial Top 10 References HTML/HTML5 Reference CSS 1,2,3 Reference
CSS 3 Browser Support JavaScript HTML DOM XML DOM PHP Reference jQuery Reference ASP.NET Reference HTML Colors Examples HTML Examples CSS Examples XML Examples JavaScript Examples HTML DOM Examples XML DOM Examples AJAX Examples ASP.NET Examples Razor Examples ASP Examples SVG Examples Quizzes HTML Quiz HTML5 Quiz XHTML Quiz CSS Quiz JavaScript Quiz jQuery Quiz XML Quiz ASP Quiz PHP Quiz SQL Quiz Color Picker Statistics Browser Statistics Browser OS Browser Display REPORT ERROR | HOME | TOP | PRINT | FORUM | ABOUT | ADVERTISE WITH US W3Schools is optimized for learning, testing, and training. Examples might be si mplified to improve reading and basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use and privacy policy. Copyright 1999-2013 by Refsnes Data. All Rights Reserved.