Re: Making a Password Confirmation in PHP
| From: | Floyd Resler | Date: | Thu, 24 Jun 2010 18:29:04 +0000 |
| Subject: | Re: Making a Password Confirmation in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306401@lists.php.net to get a copy of this message | ||
On Jun 24, 2010, at 2:22 PM, Michael Calkins wrote:
>
> This is very straight forward, if password a and b are not equal to each other, how can I let
> the user know that with out losing all of the entered information on the registration form?
> I was trying this:
> ---$p1 = "<input type=\"password\" name=\"usr_p1\" />";
> $p2 = "<input type=\"password\" name=\"usr_p2\" />";
> // if they didn't match return
> $p1 = "<input type=\"password\" name=\"usr_p1\"
> value=\"" . $p1 . "\"/>";---
> I was trying to change the value of the variable which shows the input field to have the
> password already in it.
> and either one would just be echo'd depending on the result.
> Any ideas please?
>
> From,Michael Calkinsmichaelcalkins@live.com
>
>
If you aren't opposed to using JavaScript, I'd do it there. If you don't want to use
JavaScript then you can load the form data from the $_POST (or $_GET) array that was passed back to
your script.
Take care,
Floyd