How can one validate a form | Sololearn: Learn to code for FREE!

0

How can one validate a form

in case an input is not filled

8/8/2017 1:40:56 PM

Ntiri Ebenezer Kwasi

2 Answers

New Answer

0

best way is to put "required" in end of input tag.. <input type="text" name="name" required>

0

also you can use if conditions.. for example, if you are storing input's value in $a variable then you can use "if($a=0) else"