Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Angry xampp server variables

    Hello, I recently had no trouble with PHP except now I figured out XAMPP does not let me use Server variables

    ex(page1.html):
    <form action="page2.php" method="get">
    <input type="text" name="name"/>
    <input type="submit" />
    </form>

    ex(page2.php):
    PHP Code:
    <?php
      
    echo ("Your username was: ");
      echo (
    $name);
    ?>
    nothing happens!

    help please :\

  • #2
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    If you used the $_GET superglobal it would work. Like this:

    PHP Code:
    <?php
      
    echo ("Your username was: ");
      echo (
    $_GET['name']);
    ?>

  • #3
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Thanks a ton, you proved PHP works perfectly using XAMPP

    thanks again


  •  

    Posting Permissions

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