passing hidden values through form

From: Date: Tue, 25 Sep 2001 06:03:37 +0000
Subject: passing hidden values through form
Groups: php.general 
Request: Send a blank email to php-general+get-68645@lists.php.net to get a copy of this message
Hi, I was wondering is it possible to pass the values of PHP variables in a form. I have been trying, but without success. First I call the function to generate a password and store that value in a variable called $genpassword : <?php $genpassword = generate_password() ?> <html> <body> <form name="registrationform" method="post" action="register.php"> <table> <tr> <td>Password:</td> <td><input type="password" name="password" value="<?php $genpassword ?>"></td> </tr> <td></td> <td><input type="submit" value="signup"></td> </table> </form> </body> </html> For some reason the value inside $genpassword does not show up on the password field. The password field is just empty. My question is can an input value store a PHP variable? Thanks. Peter

« previous php.general (#68645) next »