Search the Community
Showing results for tags 'form validation'.
-
So, I'm going through the tutorial https://www.w3schools.com/php/php_form_complete.asp and I thought I understood what was going on. But when I try to implement it, it goes haywire. So, I backed up, went through it again, I copied and pasted the EXACT file on the page, uploaded it to my webserver and ran it. I got this: What am i doing wrong? My webserver is running PHP 7.2
- 1 reply
-
- php 7.2
- form validation
-
(and 1 more)
Tagged with:
-
I have a form written using HTML5 and CSS3, final validation is performed on submit with JavaScript. Then, the form will be sent to the server, most likely using PHP's mail() function. I don't recall how to include two items such as these in a form's action="...", I'd deeply appreciate if someone could refresh my memory! Thank you
- 3 replies
-
- html5
- javascript
-
(and 4 more)
Tagged with:
-
I'm learning php & sql. I can do the programming and logic, but how to put it all together is where I get confused. I have copied, from the w3 tutorial, the php form validation complete, and it worked fine. I have also used the php/sql database tutorial to copy the 'insert into' code and it works fine with a Db I set up on the local host. Now I would like to save the info in the form to a database table, but I'm not sure where to insert the code to connect to the database. I tried just adding the code at the bottom of the 'Form Complete' code but it didn't seem to take - no error co
-
Hello everyone I'm trying to find out where is the problem in applying the PHP tutorial here on w3schools !!! in lesson validating an html form I apply it but it didn't work !!!! So I started from the beginning so I've created a very simple html form like this: <!DOCTYPE HTML> <html> <head> <title>th_1</title> <style> .error {color: #FF0000;} </style> </head> <body> <form method="post" action="tp_1.php"> <input type="text" name="Fname" ><span class="error"> * <?php echo $FnameErr;?></span> <p&g
-
Is there any way that we can validate our form fields with CSS3. I know that with HTML5 we can.
-
Do you think that when I validate form with js I should use trim() for removing the whitespace or I should leave this entirely on server-side code?
-
Hello I've just done my first form validation and need help with one little niggle. The problem is with the "resetForm" Function. It works in terms of clearing the form but the alert that shows is the first alert for Function validateForm i.e."We would like to know your name! A first name must be entered". Can someone see where I have gone wrong?? So the JavaScript at the mo is this: function validateForm(){var x=document.forms["contact"]["fname"].value;if (x==null || x=="") { alert ("We would like to know your name! A first name must be entered"); return false; }var x=documen