thilakan Posted October 16, 2014 Share Posted October 16, 2014 $ error = trim( strip_tags($_GET['error']) ); VS $strip_error = strip_tags($_GET['error']) ; $trim_error = trim($strip_error); Which method is correct way? Also I am first striping and trimming is it wright way. could you please advice me. Thank you Link to comment https://forums.phpfreaks.com/topic/291758-which-method-is-correct-way/ Share on other sites More sharing options...
Ch0cu3r Posted October 16, 2014 Share Posted October 16, 2014 Does not matter in what order or whether you use the functions at the same time. The end result will be the same. trim() removes white space characters at the start and end of a string strip_tags() removes html tags from a string. If you are having to pass messages in the url I would recommend $_SESSION instead. Anything in the URL can be changed by the user. Link to comment https://forums.phpfreaks.com/topic/291758-which-method-is-correct-way/#findComment-1493895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.