Results 1 to 4 of 4

Thread: PHP $_GET Variable

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2005
    Posts
    46,704

    Default PHP $_GET Variable

    $_GET variable is used to collect values in a form with method="get".


    Example

    Code:
    <html>
    <body>
    <form action="" method="get">
    Name: <input type="text" name="fname" />
    Age: <input type="text" name="age" />
    <input type="submit" />
    </form>
    
    </body>
    </html> 
    
    Welcome <?php echo $_GET["fname"]; ?>.<br />
    You are <?php echo $_GET["age"]; ?> years old!
    Last edited by minisoji; 11-15-2011 at 06:27 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •