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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.