开发者

Auto-populating a Textarea with PHP variables

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

<form method='post' action='index.php'>

<br /&开发者_JAVA百科gt;

<textarea  name="tweet" cols="50" rows="5" id="tweet" ></textarea>

<br />

<input type='submit' value='Tweet' name='submit' id='submit' />

</form>


<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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜