Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FORM DATA 2

Status
Not open for further replies.

100dtl

Programmer
Aug 18, 2003
313
GB
Hi all,

I have a form with a TEXTAREA in it, I enter

12312,12312,1231231,

What i'd like to do is get each value out by the comma delimited.. is this possible,
 
<%
textareastring=request(&quot;textareaname&quot;)

stringarray=split(textareastring,&quot;,&quot;)
%>

You now have an array - stringarray - starting at 0 containing each part of the number.

 
Sure:

Code:
Dim arrData
Dim intCount

arrData = Split(Request(&quot;fieldname here&quot;), &quot;,&quot;)

For intCount = 0 To UBound(arrData) - 1
    arrData(intCount) = Trim(arrData(intCount)
    Response.Write(arrData(intCount) & &quot;<br>&quot;)
Next

Good Luck :)

Take Care,
Mike
 
Great I'll try it...

whats up with this then?


dim Match, Matches
sql = &quot;update products set boxnumber = '&quot;&Request.Form(&quot;boxnumber&quot;)&&quot;' where sku= &quot;
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = &quot;,&quot; ' Set pattern.

Set Matches = regEx.Execute(Request.Form(&quot;sku&quot;)) ' Execute search.
For Each Match in Matches
Response.Write Match.Value
next
Response.Write sql
 
Di this:

Code:
sql = &quot;update products set boxnumber = '&quot;&Request.Form(&quot;boxnumber&quot;)&&quot;' where sku IN (&quot; & Request(&quot;sku&quot;) & &quot;)&quot;

Take Care,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top