• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

Assign text in textarea to a variable

Is there a way that I can assign the text written in a textare to a variable so that I can store it in a database?

Thanks.
0
21erinswift
Asked:
21erinswift
  • 2
1 Solution
 
rcmbCommented:
Are you talking about a text area form box?

If yes then all you need to is request.form("textareaname").

When the user submits the form to your asp page you can get the data from the submission. One thing of caution it that users routinely put single quotes in text area boxes so I would do something like:

varText = replace(request.form('textareaname"), "'", "''")

This will replace all single quotes with two single quotes and allow the sql statement to write the single quote.

RCMB
0
 
21erinswiftAuthor Commented:
Thanks for responding RCMB.  I just found a typo on my part that I didn't see before that was causing the problem.  
0
 
rcmbCommented:
So what happens next -- close this question by awarding me the points as my answer will work or get a refund?

RCMB
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now