kwdelre Posted February 9, 2011 Share Posted February 9, 2011 I'm trying to learn how to validate a form using the php server side method. Everything I search is very different and old. Anyone have knowledge of a good tutorial or source that I could use? None of my books have anything about it either! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/227217-server-side-validation/ Share on other sites More sharing options...
BlueSkyIS Posted February 9, 2011 Share Posted February 9, 2011 http://www.google.com/search?client=safari&rls=en&q=php+form+validation&ie=UTF-8&oe=UTF-8 Quote Link to comment https://forums.phpfreaks.com/topic/227217-server-side-validation/#findComment-1172076 Share on other sites More sharing options...
Psycho Posted February 10, 2011 Share Posted February 10, 2011 Everything I search is very different and old. Well, everything will be different based upon the particular needs of the validation taking place. Not everyone would validate, say, a phone number or date in the same way. YOU need to decide what data is valid for each field and build(find) the appropriate code. However, as an overall "process" for validation I will suggest that you validate ALL data for errors before determining the post is invalid. All too often I submit a form to be told that field #1 was invalid. When I fix that and resubmit I get an error that field #2 is invalid. Quote Link to comment https://forums.phpfreaks.com/topic/227217-server-side-validation/#findComment-1172113 Share on other sites More sharing options...
kwdelre Posted February 10, 2011 Author Share Posted February 10, 2011 I feel the same way. I keep running into deprecated code in the examples I can find through searches. I'm pretty good about being able to find the code to customize what I am doing. But like you mentioned I need the "overall" understanding first. Any sources out there current? Quote Link to comment https://forums.phpfreaks.com/topic/227217-server-side-validation/#findComment-1172127 Share on other sites More sharing options...
zenlord Posted February 10, 2011 Share Posted February 10, 2011 http://www.php.net/manual/en/book.filter.php Builtin into PHP: functions to validate and to sanitize several data formats: url, email, string, numeric etc. I guess this is the reason you don't find anything new about validation anymore: everyone should be using these filters... Quote Link to comment https://forums.phpfreaks.com/topic/227217-server-side-validation/#findComment-1172213 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.