Is there any html form class(text box) that does not allow null values. The inputted data is to be stored in a mysql database.
No.
Use Javascript to check on client side if every text box is filled, and also sanitize the input on the server.
you can using Javascript to check if text empty this function will help you just passing in form(onsubmit="return FormValidation();) i hope this code help you
function FormValidation()
{
if(orderform.fullname.value == "")
{
alert("Please enter your fullname");
orderform.fullname.focus();
return false;
}
if(orderform.email.value == "")
{
alert("Please enter your email");
orderform.email.focus();
return false;
}
if(orderform.telephone.value == "")
{
alert("Please enter your telephone");
orderform.telephone.focus();
return false;
}
if(forgetform.txtusername.value == "Username")
{
alert("Please enter your Username");
orderform.txtusername.focus();
return false;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With