Jump to content

Capturing input from textarea


a0101

Recommended Posts

I want to retrieve the input from the textarea from another page.

Similar to the purpose of e.g <input type="text" name="subject" value="My text here"> where I can retrieve it from another page by $subject=$_POST['subject'];

but I can't use <textarea name="subject">My text here</textarea>

or even <textarea name="subject" value="My text here"></textarea>, so how do I do it through html?

Link to comment
https://forums.phpfreaks.com/topic/266895-capturing-input-from-textarea/
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

You'll need to add htmlspecialchars () around $_POST['example'], to avoid any HTML injection attacks or simply unintentional breakage from the user's input. "<3" might not have any particular meaning as HTML code, but it will have quite a bit of effect on how the rest of the code is parsed. :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.