Tag Archives: Asterix

Need help with forms!

Ok I will be a beginner on making websites and I am wondering how I’d make someone have to fill out a field (in this case it is just a checkbox to be in accordance the terms and conditions) Here is what I get right now Without thinking about your attachment, there are a few ways. To begin with, it is advisable to let the user know which areas are mandatory. This is largely done by providing that field a asterix and somewhere close to the form state that an asterix(*) means that is the required field. To actually ensure they don’t miss a field, you would assign in which form element into a php variable, toned it, and and then check it’s duration. The reason behind trimming, is than a smart user could simply fill ones field with spots, so technically the variable may very well be equal to… PHP: $required  =  $_POST’required_field’;   //  could  be  equal  to  ”          ” So, make it happen instead PHP: $required  =  $_POST’required_field’; $required  =  trim($required); Then use strlen to check the length. In the event zero, the field is empty. Also, similar can often be done in … Continue reading

Posted in Web Design | Tagged , , , , , , | Leave a comment