ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
Re: [PHP] using new AUTOGLOBALS
by Miguel Cruz other posts by this author
Apr 5 2002 6:03PM messages near this date
[PHP] using new AUTOGLOBALS | Re: [PHP] using new AUTOGLOBALS
On Fri, 5 Apr 2002, cyberskydive wrote:
>  So I wanna learn how to code properly with register_globals off, I reead on
>  PHP.net about the new auto globals and inmy new php4.1.2 windows
>  installation using php.ini-rec edited according to the intall.txt file, and
>  a few changes from books I have (upload tmp dir etc) I'm off to learn how to
>  use the new auto globals. I've tried $_REGISTER and $_POST .  Here is what I
>  tried as a simple test.
>  
>  <form method="post" action="somefile.php">
>  <input type="text" name="is_name">
>  <input type="submit">
>  </form>
>  
>  --somefile.php--
>  
>  <?
>  
>  print("$_REGISTER["is_name"]");
>  or
>  print("$_POST["is_name"]");
>  
>  ?>

Two problems.

1) It's $_REQUEST, not $_REGISTER

2) Take the outermost quotes off the argument to your print, like so:

   print $_REQUEST["is_name"];

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
cyberskydive
Miguel Cruz
Philip Olson
cyberskydive
Erik Price
Erik Price

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved