Auto-populating a Textarea with PHP variables

前端 未结 1 1244
深忆病人
深忆病人 2021-01-18 23:55

How do I auto-populate the text area below with two PHP variables, $submission and $fullurl?


相关标签:
1条回答
  • 2021-01-19 00:30

    <textarea>s are given default values like so:

    <textarea>value</textarea>
    

    So use something like:

    <textarea name="tweet" cols="50"rows="5" id="tweet"><?php echo $submission ?> <?php echo $fullurl ?></textarea>
    

    Note that any whitespace is represented as-is in a textarea, so newlines will result in newlines in the textbox.

    0 讨论(0)
提交回复
热议问题