Tandem Posted September 25, 2006 Share Posted September 25, 2006 When i'm retrieving form data, i usually use one of the following:[code]$blah = $_POST['blah'];[/code]or[code]$blah = $_GET['blah'];[/code]What other ways are there of retrieving form data, and if they work differently at all, how do they work? Just want to expand my knowledge of php a bit. Quote Link to comment https://forums.phpfreaks.com/topic/22045-retrieving-form-data/ Share on other sites More sharing options...
trq Posted September 25, 2006 Share Posted September 25, 2006 The only other array is $_REQUEST and its just a catch all mix of $_GET and $_POST aswell as the $_COOKIE array. Quote Link to comment https://forums.phpfreaks.com/topic/22045-retrieving-form-data/#findComment-98621 Share on other sites More sharing options...
thepip3r Posted September 25, 2006 Share Posted September 25, 2006 Well aside from just calling the superglobal itself with the appropriate array reference, there is no other way. You're always going to either use the array reference or load the array reference into a variable to use the pertinent data. The only thing I might be able to add for your examples is using the $_REQUEST super global but this is bad practice as the $_REQUEST superglobal just holds data that gets posted from both $_GET and $_POST instead of either of them holding different data. Quote Link to comment https://forums.phpfreaks.com/topic/22045-retrieving-form-data/#findComment-98622 Share on other sites More sharing options...
HuggieBear Posted September 25, 2006 Share Posted September 25, 2006 Surely this is a case for RTFM :)I'd never normally suggest it as I enjoy the challenges too much, but the manual's quite good on this subject.[url=http://uk.php.net/manual/en/language.variables.external.php]Variables from outside PHP[/url]RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/22045-retrieving-form-data/#findComment-98624 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.