Re: passing hidden values through form

From: Date: Tue, 25 Sep 2001 06:21:37 +0000
Subject: Re: passing hidden values through form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68646@lists.php.net to get a copy of this message
You need to echo it :) <input type="password" name="password" value="<?=$genpassword?>"> Rick > 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 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#68646) next »