i have form .. and insid it field name pub it use fo adsense publisher id .. like this <FORM action="thanx.php" method="post"> Name :<INPUT size="40" name="name"> pubisher id:<INPUT size="40" name="pub" > <INPUT type="submit" value="send" name="send"> </FORM> Code (markup): and How can i make security for it ..because some users post their publishr id wrong ..not full and some users post in the field "text" not numbers .. so winder if i can do something in the form to tell my users that is wrong publisher id and it must be 16 number .. using php or jave but dont leave the form if it wrong ..
You may want to look into Javascript Regex validation. Regular expression are easy to learn and implement. http://www.javascriptkit.com/javatutors/re.shtml
Basic security tip: never rely solely on client side validation. Back it up with validation serverside, i.e. upon submission use PHP to make sure the user data is formatted exactly as you would like it.
Alex, absolutely true. However, it's going to be much more involved, possibly involving $_POST or $_SESSION variables as default values, so that they never 'leave the form', even if they actually do.