some.cgi?data=a&data=b&data=c

Easy question...

What happens if one submits the same parameter with multiple values to a CGI?  For example:

http://domain.com/some.cgi?data=a&data=b&data=c&data=d

What happens in this case?  How would the CGI respond?
IgorStravinskyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
It is up to the CGI to decide.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chensuCommented:
It depends on how the CGI is implemented. Maybe only the last value is effective (data=d). Maybe only the first value is effective (data=a). Maybe the CGI checks if there are duplicate parameters and returns an error message. It really depends on the implementation details of the CGI.
0
chensuCommented:
Oops, I didn't see ozo's comment. Sorry.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

IgorStravinskyAuthor Commented:
In the interests of fairness, I'll award the points to ozo.

Thanks!
0
ozoCommented:
Or maybe it takes all of them as a list of values for that parameter.
0
IgorStravinskyAuthor Commented:
Thanks.

I wasn't sure if there was some generally "accepted" way for this situation to be handled or if it was entirely up to the programmer of the CGI script.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.