Password protected form with HTML and PHP -


i'm making html form , need people validate are. how i'm planning on doing password field. password sent them email. 1 password eneugh, no need dozens of different passwords.

the html

<form action="contact.php" method="post"> <!--entire form here--> <input type="password" name="pwd" placeholder="password" required /> <input type="submit" value="submit" id="button"/> </form> 

so question is:

  1. how select password (i think in contact.php, not sure)
  2. how process password in contact.php

thanks in advance!

your form sends data page contact.php here's write in contact.php you'll value input:

<?php if (isset($_post['pwd'])) {     //comparing user input password     if ($_post['pwd'] == 'the_good_password_goes_here')     {         echo 'password good';     }     else     {         echo 'wrong password';     } } ?> 

replace the_good_password_goes_here password.

also, please consider reading this


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -