how to write a php statement within a textbox
Posted: Wed Oct 08, 2008 12:42 am
i have the following code for a textarea,in which i have written php code;
the above code i need to convert to a textbox
but the output is not getting printed in the textbox.
i need to print the password output to a textbox instead of textarea.is it right to put the coding within the value tag?
Code: Select all
textarea name="normaltxt" width="100" height="100" readonly="readonly">
<?php if (isset($_POST['submit'])){echo $pwd;} else {echo " ";} ?>
</textarea>
Code: Select all
<input type="text" name="textname" height="20" maxlength="25"
<?php if (isset($_POST['submit'])) {"value=$pwd";}?>
i need to print the password output to a textbox instead of textarea.is it right to put the coding within the value tag?