Do password fields on registration forms need to be masked?

Need help with PHP Forms?

  • I'm a complete beginner in PHP so I'm not too sure how to code this. I have two php pages: registration.php & outcome.php There is a registration form on the registration.php page. The user needs to type in his/her first name and last name. After the user clicks submit, the value that was in the input field will be copied over to the outcome.php page. <form method = "post" action = "destination.php"> First Name: <input type="text" name="fname"/> </br> Last Name: <input type="text" name="lname"/> </br> <input type = "submit"/> </form> I need to make sure that the first and last name fields are longer than 1 letter. How can I do that? I know I need to use if statements but I just don't understand how to code it. Thank you for your help!

  • Answer:

    To reload the form, I think it would be simpler to put both the form and result in to the same file. Just if and else statements to decide which page to show. To check the length, I think there was strlen() function. Something like: if (strlen($_POST['fname']) > 1) { }

lunar at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.