AV1611 Posted March 16, 2006 Share Posted March 16, 2006 is [code]$email=$_REQUEST['email];[/code]the same as[code]$email=$_POST['email'][/code]???I'm trying to get a php mail form to work that came with a flash... long story...but the php they sent uses $_REQUEST, and I have to adapt it to run on our server Quote Link to comment https://forums.phpfreaks.com/topic/5108-_request/ Share on other sites More sharing options...
High_-_Tek Posted March 16, 2006 Share Posted March 16, 2006 Yes Quote Link to comment https://forums.phpfreaks.com/topic/5108-_request/#findComment-18123 Share on other sites More sharing options...
AV1611 Posted March 16, 2006 Author Share Posted March 16, 2006 Thanks...Is it depracated? throwback to an old version? or have I just been living under a rock?[!--quoteo(post=355680:date=Mar 16 2006, 04:30 PM:name=High_-_Tek)--][div class=\'quotetop\']QUOTE(High_-_Tek @ Mar 16 2006, 04:30 PM) [snapback]355680[/snapback][/div][div class=\'quotemain\'][!--quotec--]Yes[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/5108-_request/#findComment-18125 Share on other sites More sharing options...
Barand Posted March 16, 2006 Share Posted March 16, 2006 You will get the same result from the two functions only if 'email' was POSTed from a form.If 'email' were part of a querystring then you would need to use $email = $_GET['email'];If 'email' were a cookie variable then you would need $email = $_COOKIE['email']In all three cases $_REQUEST['email] will still return the value.In other words, $_REQUEST returns the value if it is a POST, GET or COOKIE variable. Quote Link to comment https://forums.phpfreaks.com/topic/5108-_request/#findComment-18133 Share on other sites More sharing options...
kenrbnsn Posted March 16, 2006 Share Posted March 16, 2006 This is the quote from the PHP Online Manual on [a href=\"http://us2.php.net/manual/en/language.variables.predefined.php\" target=\"_blank\"]$_REQUEST[/a]:[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Variables provided to the script via the GET, POST, and COOKIE input mechanisms, and which therefore cannot be trusted. The presence and order of variable inclusion in this array is defined according to the PHP variables_order configuration directive. [/quote]Ken Quote Link to comment https://forums.phpfreaks.com/topic/5108-_request/#findComment-18144 Share on other sites More sharing options...
AV1611 Posted March 19, 2006 Author Share Posted March 19, 2006 So, the folks who provided the script were being lazy... right? instead of doing it a set way, then providing an explaination they give a one size fits all... Quote Link to comment https://forums.phpfreaks.com/topic/5108-_request/#findComment-18808 Share on other sites More sharing options...
Humpty Posted March 19, 2006 Share Posted March 19, 2006 I don't know if they were being lazy, I have pages that can posted to or accessed via alinkUp until now i've had to use a If then to work out if they were posted or not. Now that I've just learnt $_REQUEST and what does, (by reading above), I can remove many unneeded lines of code in the future, (I hate revising things that work ;) ) Quote Link to comment https://forums.phpfreaks.com/topic/5108-_request/#findComment-18896 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.