vendredi 26 février 2021

call php function on form submition

Hi im trying to generate this a code from this php function

         <?php function generateRandomString($length = 6) {
    return substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length/strlen($x)) )),1,$length);
}

echo  generateRandomString(); ?>

when this <button>Submit</button> is clicked. It is a submition button for a form in HTML

Many Thanks in advance :)




Aucun commentaire:

Enregistrer un commentaire