php - AJAX reCAPTCHA verify -


i have next html form:

<form name="register" method="post" action="register.php" > <fieldset>     <legend>register</legend>     <input type="hidden" name="regform" value="true" />      <label for="username">username:</label>     <input type="text" name="username" id="username" />     <br />     <label for="email">email:</label>     <input type="text" name="email" id="email" />     <br />     <label for="password1">password:</label>     <input type="password" name="password1" id="password1" />     <br />     <label for="password2">password:</label>     <input type="password" name="password2" id="password2" />     <br />      <?php     $config = new config();     $publickey = $config->getcaptchapublickey();     echo recaptcha_get_html($publickey);     ?>  </fieldset> <input type="submit" value="register!" /> 

what i'd do, when user presses submit button, send data forms via ajax , verify them. wondering how update recaptcha? can verify in php script, , echo new 1 included error. how send client , let javascript (jquery) replace old recaptcha new?

hope can me this.

greets,

luxo

ps: should use javascript encryption encrypt passwords before sending server?

1) request image must request recaptcha correct headers in ajax send headers requesting image in case

2) if validating through ajax must encrypt or otherwise bum can touch passwords encrypt same encryption use store in database ex: if encrypt md5 php instead encrypt pwd md5 using js , send hash


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -