Jump to content

Search the Community

Showing results for tags 'form validation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 7 results

  1. 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
  2. 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. 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
  4. JohnJeans

    Form validation

    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
  5. Is there any way that we can validate our form fields with CSS3. I know that with HTML5 we can.
  6. jimfog

    using trim

    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?
  7. 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
  • Create New...