|
-
Oct 25th, 2002, 01:35 PM
#1
Thread Starter
Hyperactive Member
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.
-
Oct 25th, 2002, 01:43 PM
#2
Thread Starter
Hyperactive Member
never mind, I think I need to set register_globals to true, or use $_REQUEST['name'] instead...
-
Oct 25th, 2002, 02:08 PM
#3
Stuck in the 80s
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.
-
Oct 25th, 2002, 02:18 PM
#4
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|