laanes Posted February 17, 2011 Share Posted February 17, 2011 Is this an effective way of accessing the $_GET and $_POST properties? I can see that the native $_GET function has been looped through so that $varName would be for example "username" and $value would be "Jeremy". Then they are both stored into an array called $getVars? Is this the best way of doing it, if not then why? foreach($_GET as $varName=>$value) $getVars[$varName]=trim(clean($value, 100)); foreach($_POST as $varName=>$value) $postVars[$varName]=trim(clean($value, 100));[/code] Kind regards, laanes Link to comment https://forums.phpfreaks.com/topic/227998-storing-and-accessing-_get-and-_post-properties/ Share on other sites More sharing options...
BlueSkyIS Posted February 17, 2011 Share Posted February 17, 2011 $_GET and $_POST arrays: looks okay to me, but we can't tell what is going to be done with $get/$postVars and we don't know what clean() function does. do you have any specific questions or concerns? Link to comment https://forums.phpfreaks.com/topic/227998-storing-and-accessing-_get-and-_post-properties/#findComment-1175700 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.