Link to home
Start Free TrialLog in
Avatar of johnsand
johnsand

asked on

How do I parse a value in CGI

 If I have a Drop-Down Combo box on a form ( such as Number of Employees ), with values like 1-15, 16-30, etc...
How do I parse the values into 2 seperate variables so I can check if it is within a range?

  Example code would be appreciated...
Avatar of sybe
sybe

What language ? Perl, ASP, C++ ?
Most languages have a split function which works something like this.

NewVars = split(your_string,"-")
FirstVar = NewVars(0)
SecondVar = NewVars(1)

But it is easier to change the dropdown box:

<select>
<option value="1">1-15
<option value="2">16-30
etc
</select>

You can name the values the way you want it and in the responding cgi process the data accordingly.



ASKER CERTIFIED SOLUTION
Avatar of mitek
mitek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of johnsand

ASKER

That's exactly what I needed MITEK...  Thanks...