Results 1 to 4 of 4

Thread: Form values not...echo'ing...

  1. #1

    Thread Starter
    Hyperactive Member Dodger's Avatar
    Join Date
    Mar 2001
    Posts
    433

    Form values not...echo'ing...

    This isn't printing the form variable, any ideas why?

    The HTML: (tst.html)
    Code:
    <html>
    <head>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="processform.php">
    <input type="text" value="Dodger" id="name" name="name">
    <br>
    <input type="submit" value="submit">
    </form>
    </body>
    </html>

    The PHP: (processform.php)
    PHP Code:
    <? echo "Hey $name, what's shakin'?"; ?>

    Running: PWS on Win98.

    Just prints: "Hey , what's shakin'?"

    TIA.

  2. #2

    Thread Starter
    Hyperactive Member Dodger's Avatar
    Join Date
    Mar 2001
    Posts
    433
    never mind, I think I need to set register_globals to true, or use $_REQUEST['name'] instead...

  3. #3
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Dodger
    never mind, I think I need to set register_globals to true, or use $_REQUEST['name'] instead...
    Yes. Starting in PHP 4.2, register_globals is off by default. The "correct" way to handle for variables after 4.2 is to use either $_GET, $_POST or $_REQUEST.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4

    Thread Starter
    Hyperactive Member Dodger's Avatar
    Join Date
    Mar 2001
    Posts
    433
    Thanks!

Posting Permissions

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



Click Here to Expand Forum to Full Width