[pmwiki-users] How to get the value of a text field form before posting ?

Peter Kay pkay42 at gmail.com
Wed Jul 27 11:27:19 CDT 2016


Let me ask you baseline question:  how well do you understand the
client/server nature of webpages?

Which relates directly to the question: what exactly do you want each
one of them to be doing with the form?

--Peter

On Wed, Jul 27, 2016 at 8:52 AM, Patrice PELLE <patrice-pelle at bbox.fr> wrote:
>
> Hello,
>
> I am a true beginner in PHP and HTML. I am trying to make a form that I hope
> will someday end up in a cookbook.
>
> In the following test form, I would like to get the value of the input text
> before posting :
>
> <!DOCTYPE html>
> <html lang=fr>
>
> <head>
> <title>Test</title>
> <meta charset = "UTF-8">
>
> </head>
>
>
> <body>
> <form action = "<?php echo $_SERVER["PHP_SELF"];?>" method = post >
>
> Admin Password : <input type="password" name = "AdminMdP" style="width:
> 20em;" required  >
>
> How to get here the value of AdminMdP to make some PHP treatment
> (suffiscient length, special characters,…), any time the value is changed ?
>
> <input type="submit"  name ="OkButton" value = "Enter">
> </form>
> </body>
>
> <?php
>
> if (isset($_POST['OkButton']))
> {
>     $AdminMdP = $_POST["AdminMdP"];
>     echo $AdminMdP;
> }
> ?>
>
> I  looked for some answers in the internet, but examples in jQuery, AJAX,
> JavaScript are useless for me. They suppose you know what it means, which is
> quite not my case. I told you, I’m a true beginner :)
>
>
> Thanks for your help
>
>
> Patrice
> patrice-pelle at bbox.fr
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>



More information about the pmwiki-users mailing list