0

I got this from a PHP site:

<textarea name="Post" style="box-sizing: border-box; width: 100%; height: 200px;" tabindex="3"></textarea>

It's a field where you can enter several lines of text. How can I use a link that you type in address bar of browser so if you visit this link it will automatically type a text into this textarea field?

Another example where I got it working:

<input type="text" tabindex="2" name="subj" maxlength="64" value="">

Here it's simple, I only need to take the name and insert it to the link, like this:

https://example.site.org/pm.php?c=1&subj=anytext

But how would it work for the textarea above? I have tried adding &Post=anytext but that didn't help me to fill the textarea with text once I visit the link? :/

Here is an image if my problem is unclear but I'm not allowed to make it visible because my low points https://i.stack.imgur.com/Kp3ir.png

hdyt
  • 1
  • Possible duplicate of [Pre-fill form field via URL in html](https://stackoverflow.com/questions/14070105/pre-fill-form-field-via-url-in-html) – molerat Dec 02 '19 at 22:02
  • 1
    You can make PHP echo the text: `` –  Dec 02 '19 at 22:08
  • @ChrisG Can you show an example link of how it would look like? I'm looking for a link that I type in address bar of browser that includes some text, where this text will be written onto that textarea field once I visit the link. – hdyt Dec 02 '19 at 22:18
  • I would look like `https://yourdomain.com/yourscript.php?subj=anytext&message=Hello%20World` –  Dec 02 '19 at 22:45
  • @ChrisG Is it not possible doing this without a script? Just by using a link that is typed in address bar and once you visit the link it will fill the text fields with some text – hdyt Dec 02 '19 at 22:49
  • yes, you can do that. if the querystring contains the `subject` parameter and you are trying to use that in the textfield then it will work without a "script" – Professor Abronsius Dec 02 '19 at 22:51
  • Are you asking how to do this with a website operated by a 3rd party? –  Dec 02 '19 at 22:51
  • @ChrisG Yes it is someone else's website, not mine – hdyt Dec 02 '19 at 22:51
  • In that case you can't, unless whoever created the site is already putting a GET parameter into the textarea (which is pretty unlikely I guess). –  Dec 02 '19 at 22:52

0 Answers0