We created two files on Linux with touch php_get.html php_get.php .
The code for the php_get.html file is as follows:
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <title> Super global variable $_get to receive the submitted data and return the information </title>5 <Metahttp-equiv= "Contnet-type"content= "Text/htm"CharSet= "Utf-8"/>6 </Head>7 <Body>8 <astyle= "font-weight:bold;color:red;"href= "php_get.php?subject= theme &web=web content">Submit data using Get mode</a>9 </Body>Ten </HTML>
Visit the php_get.html page and then this page submits the data to php_get.php, and the PHP page returns information.
The php_get.php code is as follows:
1 <!dcotype html> 2 4 <title> return information </title> <meta http-equiv=" Content-type "content=" text/html " charset= "Utf-8"/> 7 <body> 8 <? php echo " Print: ". $_get [' Subject ']. " At ". $_get [' Web '
php_get.php This page will submit the data $_get receive and print out.
PHP uses the Super global variable $_get to receive form data.