开发者

Set text in textarea with PHP

How can I set the text of a textarea object in PHP, is it necessary to use javascript.

I want to have one textarea, and开发者_如何学JAVA be able to set the text that is displayed at different times.

Thanks


<textarea rows="2" cols="20">
<?php echo "Your text here. This can be dynamically created with PHP
when the page is served."; ?>
</textarea>

So, the textarea can be filled with PHP, but if you want to change the textarea after the page has loaded.... once it's out of the hands of the server, then you have to use Javascript.


If you want to change the text after it has been downloaded by the client (for example, have the text change every five seconds or something), you must use javascript. PHP is only used for server-side generation of the markup that the client downloads.


  <td>
    <textarea rows="4" cols="10">
      <?php 
      echo $row['baddress'] ;
      ?>
    </textarea>
  </td>

  <?php 
  echo $row['baddress'];
  ?>

It must be call separately here baddress is the column name of my data base

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜