Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML form values adding commas in Classic ASP

I have a classic ASP page that submits back to itself. Strangely, the values being returned from the selects have commas being added to the ends of them. Has anyone run into anything like this before? Any troubleshooting steps or tools recommended?

I'm expecting the values to be returned just as numbers - they are the IDs of the values displayed in the option.

I've checked for mystery commas in the page and can't locate any - nor in the data that I'm pulling through.

(note - these are single-selects, not multiple)

like image 299
Kat Avatar asked Dec 07 '09 21:12

Kat


1 Answers

Sounds like you have duplicate form fields. Your values are concatenated together with commas, like this:

<input type="text" name="name1" value="value1">
<input type="text" name="name1" value="value2">
<input type="text" name="name2" value="value3">

Becomes

name1=value1,value2
name2=value3

If the second name1 has no value, it becomes

name1=value1,
name2=value3
like image 166
Sune Rievers Avatar answered Oct 23 '22 03:10

Sune Rievers