How do I validate a form without php? | Sololearn: Learn to code for FREE!


How do I validate a form without php?

I had a task: to make a registration form, but I didn'r know to use php. I thought of Java, but I am novice and I don't understand it perfectly. After the"submit" button is press, there is nothing shown to me and I don't receive anything. How should I proceed? Is it necessary to use php?

1/28/2018 8:59:38 AM

Cute but psycho

3 Answers

New Answer


Getting blank screen after form submission is normal if you didn't have a server-side component to handle it. (i.e. PHP, Python, C#, Java & Ruby) If you've no idea about Post/Redirect/Get then I would advise you to study how to build web application with any languages above and you're good to go. 😉 P/S: JavaScript can do the job too but it's client-side and server-side validation is a must.


function validateForm() {     var x = document.forms["myForm"]["fname"].value;     if (x == "") {         alert("Name must be filled out");         return false;     } }


you can make that easily using javascript