chopps Posted June 26, 2010 Share Posted June 26, 2010 Hello All, I have been struggling with this one for a while. I have created a form in a dev environment which will post back to itself. Once it posts back to itself it should have an html textarea at the top which works and the rest of the php works as well. However, I have not been able to display the output of the code generated by PHP in the text area. I have tried several ways and have still been unable; I have included one of these ways below: if(isset($_POST['submit'])) { $ossl->do_csr(); echo "<p>CSR: <TEXTAREA Name=\"comments\" rows=\"30\" cols=\"90\" value=\"<?php echo $ossl->csr; ?>\"></TEXTAREA></p>"; Does anyone know how to accomplish this? P.S. Kinda new at this so please excuse my ignorance Quote Link to comment https://forums.phpfreaks.com/topic/205951-output-php-inside-html-textarea/ Share on other sites More sharing options...
jcbones Posted June 26, 2010 Share Posted June 26, 2010 Being that we know nothing about the class $ossl, or what the function do_csr() does, or what the variable $csr holds, we couldn't possibly tell you what is wrong. You do need to change 1 line though. //This line: echo "<p>CSR: <TEXTAREA Name=\"comments\" rows=\"30\" cols=\"90\" value=\"<?php echo $ossl->csr; ?>\"></TEXTAREA></p>"; //should be: echo "<p>CSR: <textarea name=\"comments\" rows=\"30\" cols=\"90\">{$ossl->csr}</textarea></p>"; Quote Link to comment https://forums.phpfreaks.com/topic/205951-output-php-inside-html-textarea/#findComment-1077693 Share on other sites More sharing options...
chopps Posted June 26, 2010 Author Share Posted June 26, 2010 HAZAA! Thanks very much. IT worked Quote Link to comment https://forums.phpfreaks.com/topic/205951-output-php-inside-html-textarea/#findComment-1077699 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.