[PHP] RE:$_Request from 4.3 to v5.x
Isn't $_REQUEST the same as the old GPC variables in global namespace? A way to get requested variables without paying attention to whether they came in via cookies, post, or get? That's been my understanding so I've been using $_GET, $_POST, $_COOKIE instead, because that way I don't have to worry about GPC order AND I can use GET and POST together at the same time. Michael Purdy [EMAIL PROTECTED] wrote :quote --- Folks I am currently using 4.3.7. I have a script which accepts three POSTed variables from a basic form. Under 4.3.7 the script runs fine and the variables are successfully passed to the script. I am testing 5.0 C3 and receive the following error PHP Notice: Undefined index: searchtype in c:\http\cgi\list7.php on line 13 script language='php' $searchtype = $_REQUEST['searchtype']; -- this is line 13 $searchterm = $_REQUEST['searchterm']; $matchtype = $_REQUEST['match']; Any suggestions on the best way to access data input into a FORM in version 5.x would be most appreciated. Mike /quote --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE:$_Request from 4.3 to v5.x
Dennis Gearon wrote: Isn't $_REQUEST the same as the old GPC variables in global namespace? A way to get requested variables without paying attention to whether they came in via cookies, post, or get? That's been my understanding so I've been using $_GET, $_POST, $_COOKIE instead, because that way I don't have to worry about GPC order AND I can use GET and POST together at the same time. Yes, you're correct. Personal preference as to what to use, though. I like using $_REQUEST since it doesn't matter what method my forms use and in the end, I really don't care how the user sends me the information since it's all validated anyhow. If you send me the form data through a cookie, who cares, as long as it's correct... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php