+ 1
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?
3 odpowiedzi
+ 9
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.
+ 4
function validateForm() {
var x = document.forms["myForm"]["fname"].value;
if (x == "") {
alert("Name must be filled out");
return false;
}
}
+ 4
you can make that easily using javascript