Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i want to trim whitespaces in a form, so you cant write spaces as a name and submit.
Down there is my form. Thanks for the help if you understand what i mean.

What I have tried:

<form name='obrazec' method='post' action='index.php'>
    Registracija<br>
    Vnesi ime: <input type="text" id="username" name="ime"> <br>
    Vnesi geslo: <input type="password" name="geslo"> <br>
    Ponovi geslo: <input type="password" name="ponovi_geslo"> <br>
    <input name="gumb" type="submit" value="Pritisni me">
  </form>
Posted
Updated 13-Nov-18 13:41pm
Comments
Mohibur Rashid 13-Nov-18 18:24pm    
At least write a bad trim function so that we can try.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900