For one of my form entries I need the user to enter in exactly 12 variable/characters. How do I limit it so that if a user types in 11, 13 ect... that it prompts you to re-enter correctly as 12 variable/characters.
Also, since these numbers need to be unique how would you do a check if it is in the db already and prompt you for a different varibale/character set?
But you must know, that you must also do server side check
if(length($_POST["var"]) > 12)die("hack detected");
Becouse somebody may simulate post to your script (by editing form/creating fфлу request) and it may be dangerous(hack possibility)
Bookmarks