How do I auto-populate the text area below with two PHP variables, $submission and $fullurl?
<form method='post' action='index.php'>
<br />
<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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With