Hoax Posted October 2, 2011 Share Posted October 2, 2011 Hi, I am fairly new to php and I wanted to know whether you could validate a "input type = text ". I have made a class where i've made functions to validate test fields but i dont know how to call them with the html form. Any suggestions or tips .... Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/248302-how-to-validate-forms/ Share on other sites More sharing options...
mikesta707 Posted October 2, 2011 Share Posted October 2, 2011 When you submit the form, on whatever page that form is submit to you will want to run your validation code. The form data will be in either the $_POST or the $_GET super global (depending on the method you use). You could also use some sort of Javascript/AJAX validation if you want to make validation a little more user friendly. However, always remember to validate on the PHP side because a user can disable javascript and bypass any javascript based validation. Quote Link to comment https://forums.phpfreaks.com/topic/248302-how-to-validate-forms/#findComment-1275050 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.