thilakan Posted October 16, 2014 Share Posted October 16, 2014 (edited) $ 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 Edited October 16, 2014 by thilakan Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.