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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to