quick code help

1. jenifer Guest

## quick code help

when i enter the number form the form<BR>i want response to write how many 41 in there<BR>thanks <BR><BR><BR>&#060;%<BR>name = Request.Form("number")<BR>Dim counter<BR>counter = 0<BR>DIM NUMBER <BR>NUMBER = "45,44,43,42,42,40,41,41,45"<BR> <BR> if instr(number, "& name &")&#060;&#062; 0 then<BR> counter = name + 1<BR> Response.Write(counter)<BR> else<BR> Response.Write("This number never came out")<BR> end if<BR> %&#062;

2. schnookums Guest

## RE: quick code help

Not sure I understand from your explanation (or your code) what you are trying to do. Can you give a sample of what request.form("number" would normally contain? Is it a list of numbers or a single number?

3. jENIFER Guest

## RE: quick code help

I WOULD LIKE TO ENTER ANY NUMBER IN NUMBERS<BR>AS I DIM BEFORE SO<BR>WHEN I ENTER ONE NUM WHICH IS ALREADY IN NUMBER <BR>SHOULD SEARCH AND WRITE HOWMANY OF THEM THERE <BR><BR><BR><BR>&#060;%<BR>name = Request.Form("number")<BR>Dim counter<BR>counter = 0<BR>DIM NUMBER <BR>NUMBER = "45,44,43,42,42,40,41,41,45"<BR> <BR> if instr(number, "& name &")&#060;&#062; 0 then<BR> counter = name + 1<BR> Response.Write(counter)<BR> else<BR> Response.Write("This number never came out")<BR> end if<BR> %&#062;

4. schnookums Guest

## RE: quick code help

&nbsp;<BR>name = request.form("number")<BR><BR>number = "45,44,43,42,42,40,41,41,45"<BR><BR>aryVals = split(number, ",")<BR>counter = 0<BR>for x = 0 to ubound(aryVals)<BR> if int(name) = int(aryVals(x)) then counter = counter + 1<BR>next<BR>response.write "That number occurred " & counter & " times already"<BR><BR><BR>

5. jenifer Guest

## THANKS MILLION I WILL TRY NOW

thankS

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•